Getting Started with VUE

I recently went through VUE's documentation and liked it very much, so I installed it. But installing VUE-CLI is time-consuming, it took 2 days to install it. Because the installation process often fails to download a certain module.

npm install -g vue-cli


The download location in ubuntu is at
/usr/local/lib/node_modules/vue-cli

and execute vue -V to view the version.

Install atom IDE and install language vue plugin.

Then execute vue init webpack mydemo and report an error
because the version of nodejs is too low, it is now 0.10

execution
sudo npm cache clean -f

sudo npm install -g n

sudo n stable


Upgrade nodejs to 7.4.0

and execute again
vue init webpack my-project


Now there will be a lot of prompts, in which the projectname cannot contain -, change it to mydemo

to generate the project file, see attachment 2 ,

and then execute npm install to install the project depends on modules

to run the development environment
# serve with hot reload at localhost:8080
npm run dev

to run the official environment
# build for production with minification

execute tests
npm run build
# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

Reference: http://www.qdfuns.com/notes.php?mod=view&u=15904&id =fbb4d15b9c22fd373b605805bde8fd44

Continue researching ING. . .

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326988378&siteId=291194637