Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f0eab1

Browse files
committed
docs(import): document es6 import command
No change to logic. This documents that we support importing via `import shell from 'shelljs'`. Related to issue #1071, although some more investigation is required to understand why the other syntax doesn't work.
1 parent 9a0e5f6 commit 5f0eab1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ var shell = require('shelljs');
120120
shell.echo('hello world');
121121
```
122122

123+
Alternatively, we also support importing as a module with:
124+
125+
```javascript
126+
import shell from 'shelljs';
127+
shell.echo('hello world');
128+
```
129+
123130
<!-- DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED -->
124131

125132

0 commit comments

Comments
 (0)