gulp 及常用插件

1. Installing gulp

npm install gulp -g

 

2. cd you project

npm install gulp --save-dev

 

3.gulp plugins

install:

npm install gulp-ruby-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev

 This will install all necessary plugins and save them to devDependencies inpackage.json. A full list of gulp plugins can be found here.

 

4. Load in the plugins

var gulp = require('gulp'),
    sass = require('gulp-ruby-sass'),
    autoprefixer = require('gulp-autoprefixer'),
    minifycss = require('gulp-minify-css'),
    jshint = require('gulp-jshint'),
    uglify = require('gulp-uglify'),
    imagemin = require('gulp-imagemin'),
    rename = require('gulp-rename'),
    concat = require('gulp-concat'),
    notify = require('gulp-notify'),
    cache = require('gulp-cache'),
    livereload = require('gulp-livereload'),
    del = require('del');

 

你可能感兴趣的:(插件)