一、使用命令行创建第一个Hello Worls应用
1.首先确定安装好了nodejs、npm、vue-cli
node -v
npm -v
vue -V
2.初始化应用
vue init webpack [your-name]
配置如下:
liu@liu-VirtualBox:~/code/vue_test$ vue init webpack test
? Project name test
? Project description A Vue.js project
? Author name
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recom
mended) no
vue-cli · Generated "test".
# Project initialization finished!
# ========================
To get started:
cd test
npm install (or if using yarn: yarn)
npm run lint -- --fix (or for yarn: yarn run lint --fix)
npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack
3.安装依赖
cd test
cnpm install
cnpm run dev