Skip to content

Commit

Permalink
docs(import): document es6 import command
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nfischer committed Feb 14, 2022
1 parent 9a0e5f6 commit 9fa0992
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -120,6 +120,13 @@ var shell = require('shelljs');
shell.echo('hello world');
```

Alternatively, we also support importing as a module with:

```javascript
import shell from 'shelljs';
shell.echo('hello world');
```

<!-- DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED -->


Expand Down

0 comments on commit 9fa0992

Please sign in to comment.