The construction of the front-end environment

1. Node download

1. Download URL: https://nodejs.org/zh-cn/ , select the recommended version

After the download is complete, keep clicking next to install directly. You can change the installation path, but the subsequent configuration is relatively troublesome. It is recommended to use the default path.

2. node -v to verify whether the installation is successful, the version number appears to indicate success
      npm -v to check the built-in npm version
      node is the environment, npm is to place dependent packages, use cnpm, use Taobao to copy the mirror address of the external network
      npm belongs to the external Network environment, cnpm belongs to the domestic environment, faster and more convenient

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

3. The upgrade is complete, cnpm -v to view the error

 Reasons: One is the environment problem, which is caused by changing the path and environment variables before;

            The second is the problem of the default security policy of the script, use the command: 

                Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

2. Install Visual Studio Code

1. A software for editing source code, just download and install it directly from the official website, and you need to install the plug-ins you need to use

2. Add files to choose to add files to the workspace

3. Install TortoiseGit

A git-based visual GUI code management tool, you need to install git before using it, and download the code base you need to a local folder through git cloning.

4. The process of running a project

1. Click File -> Add File to Workspace

2. Right-click the file name -> open in the integrated terminal

3. Install the dependent packages required by the entire project, using the command: cnpm install

4. Install the dependencies of the module

5. Run the code

6. Install dependent packages and run code commands by viewing the contents of the project package.json file

Guess you like

Origin blog.csdn.net/weixin_45612718/article/details/124693638