|
4 | 4 | [](https://travis-ci.org/wangtao0101/vscode-js-import)
|
5 | 5 | [](https://marketplace.visualstudio.com/items?itemName=wangtao0101.vscode-js-import)
|
6 | 6 |
|
7 |
| -Intelligent and fast import extension for js in vscode, support both TypeScript and JavaScript !!! |
| 7 | +Intelligent and fast import extension for js in vscode, support import position option and adding import to existing import statement. !!! |
8 | 8 |
|
9 | 9 | # Introduce
|
10 | 10 | 
|
@@ -59,6 +59,9 @@ Also, we can skip @flow or copyright comment.
|
59 | 59 | ## Support auto code completion
|
60 | 60 | 
|
61 | 61 |
|
| 62 | +## Support import scss, css, less, json, bmp, gif, jpe, jpeg, png ... file, support css-modules |
| 63 | +see config js-import.plainFileSuffix and js-import.plainFileSuffixWithDefaultMember |
| 64 | + |
62 | 65 | ## Support multi-packages like [lerna](https://github.com/lerna/lerna) style
|
63 | 66 | If you have a file system that looks like this:
|
64 | 67 | ```
|
@@ -112,6 +115,16 @@ We will watch the change of package.json, and auto add and remove module.
|
112 | 115 | //Glob for files to watch and scan, e.g ./src/** ./src/app/**/*.js. Defaults to **/*.{jsx,js,ts,tsx}
|
113 | 116 | "js-import.filesToScan": "**/*.{jsx,js,tsx,ts}"
|
114 | 117 |
|
| 118 | +//suffix of plainFiles. Defaults to css,less,sass |
| 119 | +//When import file with these suffixes, the import statement only has 'import' and 'model-name' like 'import 'xxx.less'. |
| 120 | +//if you use css modules, you can remove css,less,sass in here, see config js-import.plainFileSuffixWithDefaultMember |
| 121 | +"js-import.plainFileSuffix": "css,less,sass" |
| 122 | +
|
| 123 | +//suffix of plainFiles which should be imported with default member. Defaults to json,bmp,gif,jpe,jpeg,png |
| 124 | +//When import file with these suffixes, the import statement has default import like 'import json form 'xxx.json' |
| 125 | +//if you use css modules, you can add css,less,sass in here |
| 126 | +"js-import.plainFileSuffixWithDefaultMember": "json,bmp,gif,jpe,jpeg,png" |
| 127 | +
|
115 | 128 | //the insert position of new import statement, first means first of all imports, last means last of all imports, soon we will suport sort
|
116 | 129 | "js-import.insertPosition": "last"
|
117 | 130 |
|
|
0 commit comments