Home>Article>Development Tools> How to install nodejs smart prompts in vscode

How to install nodejs smart prompts in vscode

王林
王林 Original
2020-02-11 16:52:57 3677browse

How to install nodejs smart prompts in vscode

1. First install the typings package. If you are using the Taobao image, enter cnpm. cmd execution:

cnpm i typings -g //cnpm install typings -global

2. Through the above command, the typings package is downloaded. Then we go to the project development directory, open the command window, and enter:

typings init

. Now in the current directory A typings.json file will appear. This file is the typing configuration file (the installed typings package). It is generally used for team development. It is similar to npm's package.json

and then in the directory change command window Enter the following command to install the prompt file of the js plug-in, as follows:

typings install dt~node --global --save //typings install dt~jquery --global --save //typings install express --ambient --save

(–global: represents the global file, some packages must add this parameter)
(–save: represents this time The installation information is recorded in the typings.json mentioned above)

Create an empty jsconfig.json file in the current directory. This step is very important; after creating this file, restart VSCode to obtain The code prompted.

You can refer to the following new file commands, such as:

1,cd.>a.txt

cd. means changing the current directory to the current one directory, which means it has not changed; and there will be no output from this command.

> means writing the command output to a file. Followed by a.txt, it means writing to a.txt. In this example, the command has no output, so an empty file with no content is created.

2,copy nul a.txt

nul represents an empty device. Conceptually, it is invisible and exists in every directory. You can view it into a special "file", which has no content; generally, the output can be written to nul to achieve the purpose of shielding the output, such as pause>nul. The execution effect of this command is to pause, and "Please press any key to continue" will not be displayed. . . .”.

This example means copying an empty device to a.txt, which also creates an empty file with no content.

3,type nul>a.txt

This example indicates that the contents of the empty device are displayed and written to a.txt.

4,echo a 2>a.txt

"2" represents the handle of the error output. There is no error output in this example, so an empty space with no content is created. document. In fact, by default, handle 1, which is the standard output handle, is redirected. For example, cd.>a.txt is actually cd. 1>a.txt.

Similarly, handles 3 to 9 can also be used in this example. They are undefined handles and there will be no output, such as echo a 3>a.txt.

5,fsutil file createnew d:\a.txt 0

An empty file was created using fsutil.

6、copy con a.txt

Enter Ctrl Z

Related recommendations:vscode tutorial

The above is the detailed content of How to install nodejs smart prompts in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn