Skip to content

Commit e9f47ef

Browse files
committed
Document plugin options
1 parent daeca3f commit e9f47ef

1 file changed

Lines changed: 39 additions & 2 deletions

File tree

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,46 @@ If you are using ES7 features (like `import`), JSX, and Flow, use
1111
[babel-preset-lightscript](https://github.com/lightscript/babel-preset-lightscript)
1212
to target ES6 instead of using the plugin directly.
1313

14+
If you are using `babel-plugin-lightscript` with other plugins, be sure it is the *first* plugin.
15+
16+
### Options
17+
18+
You may disable the standard library:
19+
20+
{
21+
"plugins": [
22+
["lightscript", { "stdlib": false }]
23+
]
24+
}
25+
26+
Or disable its inclusion of lodash:
27+
28+
{
29+
"plugins": [
30+
["lightscript", {
31+
"stdlib": {
32+
"lodash": false,
33+
}
34+
}]
35+
]
36+
}
37+
38+
Or tell it to use `require()` instead of `import`:
39+
40+
{
41+
"plugins": [
42+
["lightscript", {
43+
"stdlib": {
44+
"require": true,
45+
}
46+
}]
47+
]
48+
}
49+
50+
1451
### Contributing
1552

16-
You will need to link babel-plugin-lightscript to itself:
53+
You will need to link `babel-plugin-lightscript` to itself:
1754

1855
cd babel-plugin-lightscript
1956
npm link
@@ -22,4 +59,4 @@ You will need to link babel-plugin-lightscript to itself:
2259
npm run build
2360
npm test
2461

25-
Please report issues on [the main lightscript repo](https://github.com/lightscript/lightscript) instead of here.
62+
Please report issues on [the main lightscript repo](https://github.com/lightscript/lightscript) instead of here.

0 commit comments

Comments
 (0)