1. Configuration environment
1. Install nodejs
sudo apt install nodejs
test
nodejs -v
2. Install npm
sudo apt install npm
test
npm -v
3. Install cnpm
sudo npm install -g cnpm
If it is slow, use the following Taobao source to install
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
test
cnpm -v
2. Build a framework
1. Install vue
sudo cnpm install -g vue-cli
test
vue -V
2. New project
sudo vue init webpack vue-demo2
Enter the newly created project folder and install dependencies
cd vue-demo2
sudo cnpm install
run
sudo npm run dev
Browser find localhost:8080
3. Run someone else's vue shelf
1. Get a github clone, and most of them have installation tutorials and steps.
2. Open the command line directly in IDEA, which is this Terminal. Follow the above operations to install dependencies
npm install
If an error is reported and the operation cannot continue, try cnpm
3. Run
npm run serve
4. IDEA's vue plugin
File-setting-Plugins searches for vue and installs it directly, then restart idea, you can recognize the vue suffix file