1. Check whether the node environment is installed
Check the node version command
$ node -v
2. Install vue
$ npm install -g vue-cli
//-g means global installation, vue-cli is a module, globally installed modules can be used directly on the command line
Because the speed of npm website is very slow in China, you can add Taobao mirror image after the command,
namely: npm install -g vue-cli --registry=https://registry.npm.taobao.org
, you can view it with vue -V Whether vue is installed well, the installation is successful when the version number appears.
+ [email protected]
3. Create the project framework
Create a project called webpack
vue init webpack my-vue
Project name —> Project name (not required, default project name above)
Project description —> Project description (not required)
Author —> Author (not required)
4. Enter the project
cd my-vue
- Startup project
npm run dev