Vue install and create a project

Now the front end of the mainstream has three framework, vue, angular, react, vue is the people Daniel created, locate the beginning of dependent libraries, but the development is now a mature front-end framework, so we need to look at this vue. How does that create a vue project, we started from the download node.js.

    1. node Kan网: https: //nodejs.org/en/;

    2. Install node.js, Note: Before installing Node.js, first cmd (command prompt) to run node -v to see whether there is Node.js version, and if so, uninstall or delete;

    3. npm install, whether npm npm -v view the installation;

      Open cmd, installation, input commands:

      Elevation install g cnpm --registry = https: //registry.npm.taobao.org;

    4. vue-cli installation, command line npm install -g vue-cli;

      Of this, the global environment has been completed structures, often use the following:

    5. Create a project

      Create a folder (total project), such as: vuework folder in the folder column address input cmd enter this folder;

      Create a project, the command: vue init webpack my-vue (my-vue project folder name), has been enter, routing plug-in installed, the other was no, need es6 grammar checker can install it yourself;

    6. Access project

      The address bar to enter the project folder cmd, enter the execution:
      Run the command: npm run dev;

    7. When people visit the project, install rely npm install

    8. Upload server, modify config-> index.js-> assetsPublicPath: '/', to assetsPublicPath: './';

      Run the command: npm run build;

       

Guess you like

Origin www.cnblogs.com/ECJTUACM-1435867846/p/11803076.html