Skip to content

Commit d0c44f1

Browse files
committed
Readme: Babel TS syntax plugin
1 parent 8d85a3b commit d0c44f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ The following options are available when running the Babel plugin:
5757

5858
- **`removeImport`** — If `true`, removes any import declarations with module name `'regex'`.
5959
- **`disableUnicodeSets`** — If `true`, adds `regex` option `disable: {v: true}` to all regexes before transformation.
60+
- **`headerComment`** — If given a value, it will be added in a comment at the top of processed output/files.
6061
- **`optimize`** (*experimental*) — If `true`, attempts to further optimize the regex source generated by `regex`.
6162
- Uses an external library ([regexp-tree](https://github.com/DmitrySoshnikov/regexp-tree)'s optimizer) that doesn't support flag-<kbd>v</kbd>-only syntax and isn't fully context-aware, so you should check the output.
62-
- **`headerComment`** &mdash; If given a value, it will be added in a comment at the top of processed output/files.
6363

6464
## Compatibility
6565

@@ -79,7 +79,7 @@ There are several ways to address this:
7979
- This maintains 100% parity between code running with or without the Babel plugin.
8080
- This doesn't support the use of <kbd>v</kbd>-only syntax.
8181

82-
You can try all these options in the [demo REPL](https://slevithan.github.io/babel-plugin-transform-regex/demo/).
82+
You can try all of these options in the [demo REPL](https://slevithan.github.io/babel-plugin-transform-regex/demo/).
8383

8484
## Installation and usage
8585

@@ -113,6 +113,8 @@ Or to set plugin options:
113113
}
114114
```
115115

116+
> If you're using TypeScript, also add [@babel/plugin-syntax-typescript](https://babeljs.io/docs/babel-plugin-syntax-typescript).
117+
116118
Then add a script to your `package.json` to run the build:
117119

118120
```json

0 commit comments

Comments
 (0)