1.node-v
2.npm -v 是node包的管理工具
3.vue -- version
如果上述的在终端都可以查看到安装相应的版本的话就可以使用Vue基于webpack构建项目
4.vue init webpack my-project
5.一系列的一些配置信息
? Project name my-project
? Project description A Vue.js project
? Author liudefu liudefu@china.zhaogang.com
? 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) npm
....
To get started:
cd my-project
npm run dev
6.然后 cd my-project 运行npm run dev得到
DONE Compiled successfully in 2769ms
I Your application is running here: http://localhost:8081
至此基于webpack构建的项目已经ok了
网友评论