- webpack is used for a variety of front-end file is packaged up webpack Chinese network
- Development Environment:
1> before installing node.js go to the official website to download
2> execute CMD commands:node -v
andnpm -v
(displays the version number that is installed successfully)
(80% or less of the command line in here playing, no repeat)
- Master told me often that some npm blocked resources or they are foreign resources, resulting in the use of npm install dependencies will fail, so every time we install good domestic npm Mirror: CNPM
★ CMD command:npm install -g cnpm --registry=http://registry.npm.taobao.org
- Vue-cli install scaffolding building tools
★ CMD command:cnpm install -g vue-cli
At this point pinch, we need an environment and tools ready (to create a new project after the process described above would not matter), followed to build the project using vue-cli.
- Open a command window in the directory you want to place themselves under the project
7. Run the command: vue ini webpack firstVue
WebPACK: build tool, the module packager
firstVue: Project folder name
this folder is automatically created in the folder in your folder under
the installation process requires us to successively enter a project name, author, description, version, ESLint specification and so on, where in addition ESLint specification n play installation can fool the rest (ESLint specification limits writing specifications, error draw tears even crazy)
8. cd into our project folder firstVue, run: cnpm install
install the package, then the project will be more than a directory that contains the project dependencies resources it
9. You can run the entire project in firstVue:npm run dev