From 9fa099230cbab0518b82b705857c4b06dec578f5 Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Sun, 13 Feb 2022 17:07:30 -0800 Subject: [PATCH] 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. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 9aadcef1..e88f6965 100644 --- a/README.md +++ b/README.md @@ -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'); +``` +