Nine, vue-cli installation, create a project, the project started

node environment configuration: Installation nodejs configure the environment variables
NVM Manager version
  1. After installation configuration environment variable C nvm-setup: \ Users \ Administrator \ AppData \ Roaming \ nvm default
  node 2. Install the specified version: the install 10.16.0 NVM
  . 3 The switching node use the version number version
  4. uninstall specified version version nvm uninstall

NPM Package Manager
  1. nvm go with this version check the version -v npm
  2. installation package: Global npm install the package name -g, local npm install the package name use require () references
  3. Uninstall npm uninstall package name
  4. Search package: npm search package name
  5. with a new package: npm update package name

Installation vue
  1. Installation global and local needs, local installation can require () to reference global be mounted directly on the command line
  after generating a file 2. conveniently used by others to see package.json dependencies npm init
  3. After the installation npm install vue --save installed locally, and stored in the dependice package.json
  installation after 4. npm install vue --save-dev installed locally, and to save the package.json in dependice-dev ( development environment)
  5.npm install VUE -g global installed
  6.npm install -g @ vue / cli vue -cli is needed is a global install
  * this might be a hole, install npm not, you need to download the manual installation configuration does not look finished It has been given to the file, modify Road King just fine

Verifying the Installation:
cmd VUE --version

 

2. Create a project:
  command line to create: cmd cd to the file you want to create a project folder, execute the command vue create the project name

    1.node_modules: local installation package file folder
    2.public: Project export file
    3.src: project resource files
      * assets: resource files, including fonts, pictures, etc.
      * components: component files
      * App.vue: inlet assembly
      * main. js: webpack entry in the file package when the
  4.babel.config.js: es js turn low-level language profile
  5.package.json: project management package file
3. run the project:
  cd to the project folder run npm run serve

 

 

 

Guess you like

Origin www.cnblogs.com/Mr-Simple001/p/12108211.html