Skip to content

Commit ab9beee

Browse files
committed
Add snippet for importing ES6 module without module name
1 parent 4322e19 commit ab9beee

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Below is a list of all available snippets and the triggers of each one. The **
2727
| Trigger | Content |
2828
| -------: | ------- |
2929
| `imp→` | imports entire module `import fs from 'fs';`|
30+
| `imn→` | imports entire module without module name `import 'animate.css'` |
3031
| `imd→` | imports only a portion of the module using destructing `import {rename} from 'fs';` |
3132
| `ime→` | imports everything as alias from the module `import * as localAlias from 'fs';` |
3233
| `ima→` | imports only a portion of the module as alias `import { rename as localRename } from 'fs';` |

snippets/snippets.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"body": "import ${2:moduleName} from '${1:module}';$0",
55
"description": "Imports entire module statement in ES6 syntax"
66
},
7+
"importNoModuleName": {
8+
"prefix": "imn",
9+
"body": "import '${1:module}';$0",
10+
"description": "Imports entire module in ES6 syntax without module name"
11+
},
712
"importDestructing": {
813
"prefix": "imd",
914
"body": "import { $2 } from '${1:module}';$0",

0 commit comments

Comments
 (0)