Vue environment configuration: node.js

  1. webpack is used for a variety of front-end file is packaged up webpack Chinese network
  2. Development Environment:
    1> before installing node.js go to the official website to download
    2> execute CMD commands: node -vand npm -v(displays the version number that is installed successfully)
    (80% or less of the command line in here playing, no repeat)
    Displays the version number that is successfully installed
  3. 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.orgMirroring the domestic npm into cnpm
  4. 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.


  1. Open a command window in the directory you want to place themselves under the project

cd to the directory under their own
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
Here Insert Picture Description
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 installinstall the package, then the project will be more than a directory that contains the project dependencies resources it
Project dependencies resources
9. You can run the entire project in firstVue:npm run dev
Will be

Released nine original articles · won praise 0 · Views 137

Guess you like

Origin blog.csdn.net/weixin_38990605/article/details/103398553