Recently using Gulp to help me to build some technical blocks of automation, feel very good, so take the gulp operation steps to write notes, recorded ...
first understand what is Gulp?
My understanding is a tool and an automated one that can help you translate some of the front-end technical syntax into the technology that your current browser can read. such as Less.css,sass.css or ES6 and so on, as long as the configuration is ready to run.
Gulp Installation
Direct global installation for ease of use
NPM Install Gulp-g
Then install the configuration in the specified project project
NPM Install Gulp--save-dev This is to set the gulp configuration to the specified project project directory, there is a Package.json configuration file,
Configure Gulp in a devdependencies attribute, if you want to configure more just write it and you can download the module in one gulp.
npm install gulp-ruby-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-clean gulp-notify gulp-rename gulp-livereload gulp-cache --save-dev
Show more intuitive results with diagrams
NPM Downloads What you need to do according to your needs, and then we need to create a reference to the gulpfile.js
Gulp module that we downloaded.
In the context of node. js, we can refer directly to require.
Some of the configuration properties inside
GULP.SRC: Used to specify that one or more files are referenced
Gulp Automated Construction