Skip to content

Commit 4af1296

Browse files
committed
add removeAll option to the readme
1 parent b92943e commit 4af1296

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Remove 'use strict' if the file is 'not strict'
44

5-
Most of the bundlers and transpilers such as babel add `'use strict'` to the above of your file. This plugin will remove them if you add `'not strict'` to that file.
5+
Most of the bundlers and transpilers such as babel add `'use strict'` to the above of your file. This plugin will remove them if you add `'not strict'` to that file. You can also use this plugin to remove `'use strict'` from all the files
66

77
## Installation
88
```
@@ -15,6 +15,7 @@ npm install -save-dev "@babel/core"
1515
```
1616

1717
## Usage
18+
1819
1) put the following in above the a file that is not strict:
1920
```js
2021
'not strict'
@@ -35,3 +36,26 @@ module.exports = {
3536
sourceMap: "inline",
3637
};
3738
```
39+
40+
### Usage Remove All
41+
42+
You can also use this plugin to remove `'use strict'` from all the files. Just pass `removeAll: true`.
43+
```js
44+
let presets = [];
45+
46+
let plugins = [
47+
[
48+
"babel-plugin-transform-not-strict",
49+
{
50+
removeAll: true,
51+
},
52+
],
53+
];
54+
55+
module.exports = {
56+
presets: presets,
57+
plugins: plugins,
58+
exclude: "node_modules/**",
59+
sourceMap: "inline",
60+
};
61+
```

0 commit comments

Comments
 (0)