Here is the quote
1. Create a vuejs file after downloading the vuejs file in idea
Click next to enter the next step
2. After creating the file, select the location of the file and select the location of the vue scaffolding cli
3. After successfully creating the project, click to enter the terminal command line
4. Enter the command vue init webpack to the command line
Enter the command vue init webpack into the terminal, and the effect is shown in the figure.
Note y means yes, n means no
? Project name (my-project) hit y and press enter
? project description (A Vue.js project) Just hit enter
? Author (xxxxxx [email protected]) just hit enter
? Vue build (user arrow Keys) Just hit enter
? Install vue-router? (Y/n) Just hit Y and press Enter (whether to install routing, the key to single page)
? Use ESLint to lint your code? (Y/n) Just hit n and enter (whether to use strict mode)
? Set up unit tests (Y/n) Just hit n and press Enter (unit test, I don’t think it is installed and choose n)
? Setup e2e tests with Nighwatch? (Y/n) (e2e test, I personally think that I don’t want to install and choose n)
? Should we run npm install
for you after the project has been created? (recommended) (use arrow Keys)
should ask you whether the next dependency is installed through npm.
If you press Enter directly, then the next installation will be very slow
So directly Ctrl+C to cancel, or select No, I will handle that myself then
Enter cnpm install to install through Taobao mirror cnpm
Taobao mirror, you can refer to other blogs.
Note: cnpm must be used all the time, not mixed with npm
Enter the command cnpm install. At
this time, there may be a problem that cnpm does not respond. At this time, close the project
. Enter the following command in cmd
npm config set registry http://registry.cnpmjs.org
Then reopen the project, and enter cnpm install, the final effect is shown in the figure
Enter the command cnpm run dev
Click the link on the picture to enter
Indicates that the file was created successfully