You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-4Lines changed: 51 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,34 @@
2
2
3
3
TypeScript language service plugin supporting for importing assets.
4
4
5
-
## Demo
5
+

6
6
7
-
TODO
7
+
## Motivation
8
8
9
-
## Install
9
+
In web front-end development, you often type asset import statements. However, asset import statements are not completed in the editor, which makes typing them difficult.
10
+
11
+

12
+
13
+
This plugin solves this problem by providing completion for asset import statements.
14
+
15
+

16
+
17
+
## Installation
10
18
11
19
```console
12
20
$ npm install -D @mizdra/typescript-plugin-asset
13
21
```
14
22
15
-
## Usage
23
+
## How to setup
24
+
25
+
To use this plugin, you need to follow three steps.
26
+
27
+
1. Write the plugin configuration in `tsconfig.json`
28
+
2. Configure your editor to use the TypeScript language service plugin
29
+
30
+
### Write the plugin configuration in `tsconfig.json`
31
+
32
+
Add the following configuration to `tsconfig.json`. See [Options](#options) for details.
> Note: If you're using Visual Studio Code, you'll have to use the first approach above, with a path to the module, or run the "TypeScript: Select TypeScript Version" command and choose "Use Workspace Version", or click the version number between "TypeScript" and 😃 in the lower-right corner. Otherwise, VS Code will not be able to find your plugin.
62
+
63
+
Visual Studio Code cannot load plugins by default. Therefore, special operations are required.
64
+
65
+
Specifically, you have to do two operations:
66
+
67
+
1. Run the "TypeScript: Select TypeScript Version" command
68
+
2. Choose "Use Workspace Version"
69
+
70
+
Also, although this is optional, the following settings can be added to `.vscode/settings.json` to prompt other team members to change the above settings.
0 commit comments