vue new project or what happened to the computer reinstall the system

 Basic install node, git or svn, compiler (e.g. VSCode) etc.
 
1 installation Taobao mirror
Open the install command terminal -g CNPM --registry = NPM https://registry.npm.taobao.org
 
If the direct look at old projects
The project pulled down
Then cnpm i
npm run dev gets the job done
If the project is just a new project, then a little extra effort
2 initialization project vue init webpack project name
3 vue scaffolding  
Global installed scaffolding vue
cnpm install vue-cli -g
4 series of plug-in installation
cnpm install axios --save-dev
 
cnpm install jsonwebtoken -S
 
cnpm install vuex --save-dev
 
cnpm install json-server -g
5 glup installation
npm install gulp -g global installation 
 
npm install gulp --save-dev mounted locally 
 
npm init -y configuration file initialization package.json 
 
Installation gulp plug
Command: npm install --save-dev plugin name
npm install --save-dev gulp-cssmin   
npm install --save-dev gulp-uglify
 
gulp-sass sass file will be transferred to a css file (not possible security selective installation)
gulp-cssmin css file compression
gulp-uglify compressed js file
gulp-concat merge files
gulp-rename rename
gulp-imagemin compressed image file (unstable)
 
 
ES5 conversion
npm install -g babel-cli global open cmd installed directly mounted babel
Mounting the babel npm install --save-dev babel-preset-es2015 babel-cli local project gulp
 
6 webpack
 
1, the global open cmdz directly mounted installation c
2, a partial installation npm install --save-dev webpak @ 3 projects into the installation
(Re-create a folder named English before not to use gulp project)
webpack -v
 
3, the configuration file folder package.json npm package packaged into the command: npm init -y
 
 
Project directory operations;
Install the plug-in: npm install html-webpack-plugin --save
Install the plug-in: npm install css-loader style-loader   
 
After installing the plug-ins can go package.json view the plug-in is successfully installed
I:
1, the installation
cnpm  install sass-loader --save-dev
cnpm install node-sass --save-dev
2, modify the configuration
Add a profile in the build folder under the rules inside webpack.base.conf.js
 
{
test:/\.scss/,
loader:["style-loader","css-loader","sass-loader"]
}
 
<style lang="scss">

Guess you like

Origin www.cnblogs.com/guanpingping/p/11125272.html