gulp插件选择
使用的插件
无依赖的
- del: Delete files/folders using globs.
- opn: A better node-open. Opens stuff like websites, files, executables. Cross-platform.
- psi: PageSpeed Insights for Node.
- wiredep: Wire Bower dependencies to your source code.
- browser-sync: Live CSS Reload & Browser Syncing.
- require-dir: Helper to require() directories.
run-sequence: Run a series of dependent gulp tasks in order.
gulp辅助
gulp: The streaming build system.
- gulp-if: Conditionally run a task.
- gulp-cache: A cache proxy task for Gulp.
- gulp-changed: Only pass through changed files.
- gulp-filter: Filter files in a vinyl stream.
- gulp-replace: A string replace plugin for gulp.
- gulp-flatten: remove or replace relative path for files.
- gulp-useref: Parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.
gulp-load-plugins: Automatically load any gulp plugins in your package.json.
gulp plugins for css
gulp-autoprefixer: gulp-autoprefixer.
- gulp-uncss: Remove unused CSS selectors.
- gulp-csso: Minify CSS with CSSO.
gulp-less: Less for Gulp.
gulp plugins for scripts
gulp-jshint: JSHint plugin for gulp.
jshint-stylish: Stylish reporter for JSHint.
gulp plugins for compress
gulp-concat: Concatenates files.
- gulp-imagemin: Minify PNG, JPEG, GIF and SVG images.
- gulp-minify-html: Minify html with minimize.
- gulp-minify-css: Minify css with clean-css.
- gulp-uglify: Minify files with UglifyJS.
gulp-size: Display the size of your project.
测试相关
karma 自动测试插件
karma-Chrome-launcher: 调用Chrome进行测试
待选
gulp-livereload
- gulp-autowatch
generator-gulp-webapp
"devDependencies": {
"apache-server-configs": "^2.7.1",
"connect": "^3.0.1",
"connect-livereload": "^0.4.0",
"del": "^0.1.0",
"gulp": "^3.6.0",
"gulp-autoprefixer": "^0.0.7",
"gulp-cache": "^0.2.2",
"gulp-csso": "^0.2.6",
"gulp-filter": "^0.5.0",
"gulp-flatten": "^0.0.2",
"gulp-if": "^1.2.1",
"gulp-imagemin": "^0.6.0",
"gulp-jshint": "^1.5.3",
"gulp-livereload": "^2.0.0",
"gulp-load-plugins": "^0.5.0",<% if (includeSass) { if (includeBootstrap) { %>
"gulp-replace": "^0.3.0",<% } %>
"gulp-ruby-sass": "^0.5.0",
"gulp-plumber": "^0.6.3",<% } %>
"gulp-size": "^0.4.0",
"gulp-uglify": "^0.3.0",
"gulp-useref": "^0.6.0",
"jshint-stylish": "^0.2.0",<% if (includeBootstrap && includeSass) { %>
"lazypipe": "^0.2.1",<% } %>
"main-bower-files": "^1.0.1",
"opn": "^0.1.1",
"serve-index": "^1.1.4",
"serve-static": "^1.4.0",
"wiredep": "^1.4.3"
}
web-starter-kit-master
"devDependencies": {
"apache-server-configs": "^2.7.1",
"browser-sync": "^1.3.0",
"del": "^0.1.2",
"gulp": "^3.8.5",
"gulp-autoprefixer": "^0.0.8",
"gulp-cache": "^0.2.2",
"gulp-changed": "^1.0.0",
"gulp-csso": "^0.2.9",
"gulp-flatten": "^0.0.2",
"gulp-if": "^1.2.1",
"gulp-imagemin": "^1.0.0",
"gulp-jshint": "^1.6.3",
"gulp-load-plugins": "^0.5.3",
"gulp-minify-html": "^0.1.4",
"gulp-replace": "^0.4.0",
"gulp-ruby-sass": "^0.7.1",
"gulp-size": "^1.0.0",
"gulp-uglify": "^0.3.1",
"gulp-uncss": "^0.4.5",
"gulp-useref": "^0.6.0",
"jshint-stylish": "^0.4.0",
"opn": "^1.0.0",
"psi": "^0.1.2",
"require-dir": "^0.1.0",
"run-sequence": "^0.3.6"
}
原文: https://leohxj.gitbooks.io/front-end-database/content/frontend-workflow/gulp-plugins.html