1、创建项目
在cmd里输入:
cd my_projects\flask_vue
vue init webpack frontend
? Project name frontend
? Project description A Vue.js project
? Author
? 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? (recommended) npm
2、安装依赖
在cmd里 1).输入:cd frontend (项目名),回车,进入到具体项目文件夹
2).输入:cnpm install,回车,等待一小会儿,会发现项目结构里,多了一个
node_modules文件夹,这里面都是项目的依赖文件。
3).输入:cnpm run dev ,回车运行项目
4).输入:cnpm run build ,构建项目