Skip to content

Commit 4b6d8a6

Browse files
committed
docs: update README with correct package name and license
- Update title to reflect @rightcapital/php-parser package name - Replace all php-parser-ts references with @rightcapital/php-parser - Fix license from BSD-3-Clause to MIT to match actual LICENSE file
1 parent d0dff0d commit 4b6d8a6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# php-parser-ts
1+
# @rightcapital/php-parser — A Pure TypeScript Port of nikic/PHP-Parser
22

33
<!-- Badges area start -->
44

@@ -67,15 +67,15 @@ This project is a faithful port of nikic/PHP-Parser v5 from PHP to TypeScript. I
6767
## Installation
6868

6969
```bash
70-
npm install php-parser-ts
70+
npm install @rightcapital/php-parser
7171
```
7272

7373
## Usage
7474

7575
### Parsing PHP Code
7676

7777
```typescript
78-
import { ParserFactory } from 'php-parser-ts';
78+
import { ParserFactory } from '@rightcapital/php-parser';
7979

8080
const factory = new ParserFactory();
8181
const parser = factory.createForNewestSupportedVersion();
@@ -85,7 +85,7 @@ const ast = parser.parse('<?php echo "Hello, World!";');
8585
### Dumping the AST
8686

8787
```typescript
88-
import { NodeDumper } from 'php-parser-ts';
88+
import { NodeDumper } from '@rightcapital/php-parser';
8989

9090
const dumper = new NodeDumper();
9191
console.log(dumper.dump(ast));
@@ -94,7 +94,7 @@ console.log(dumper.dump(ast));
9494
### Pretty Printing
9595

9696
```typescript
97-
import { StandardPrettyPrinter } from 'php-parser-ts';
97+
import { StandardPrettyPrinter } from '@rightcapital/php-parser';
9898

9999
const printer = new StandardPrettyPrinter();
100100
console.log(printer.prettyPrintFile(ast));
@@ -103,7 +103,7 @@ console.log(printer.prettyPrintFile(ast));
103103
### Traversing and Transforming
104104

105105
```typescript
106-
import { NodeTraverser, NodeVisitor } from 'php-parser-ts';
106+
import { NodeTraverser, NodeVisitor } from '@rightcapital/php-parser';
107107

108108
class MyVisitor extends NodeVisitor {
109109
enterNode(node) {
@@ -119,7 +119,7 @@ const modified = traverser.traverse(ast);
119119
### Building AST Nodes
120120

121121
```typescript
122-
import { BuilderFactory } from 'php-parser-ts';
122+
import { BuilderFactory } from '@rightcapital/php-parser';
123123

124124
const factory = new BuilderFactory();
125125
const classNode = factory.class_('MyClass')
@@ -206,4 +206,4 @@ npm run build
206206

207207
## License
208208

209-
BSD-3-Clause (same as nikic/PHP-Parser)
209+
MIT

0 commit comments

Comments
 (0)