Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steel1990/gulp-compressor
gulp plugin for compress html,css and js
https://github.com/steel1990/gulp-compressor
Last synced: about 1 month ago
JSON representation
gulp plugin for compress html,css and js
- Host: GitHub
- URL: https://github.com/steel1990/gulp-compressor
- Owner: steel1990
- Created: 2014-06-12T04:52:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-12T05:31:16.000Z (over 10 years ago)
- Last Synced: 2024-11-23T13:35:42.781Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 13
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gulp-compressor
===============A gulp plugin for compress html,css and js.
html minify is use [htmlcompressor](https://code.google.com/p/htmlcompressor/),all configs are valid.
css and js minify is use [yuicompressor](http://yui.github.io/yuicompressor/),all configs are valid too.
## How To Use
var gulp = require('gulp');
var compressor = require('gulp-compressor');// html compressor
gulp.task('html', function () {
gulp.src('path/to/*.html')
.pipe(compressor({
'remove-intertag-spaces': true,
'simple-bool-attr': true,
'compress-js': true,
'compress-css': true
}))
.pipe(gulp.dest('path/to/output/'));
});// js compressor
gulp.task('js', function () {
gulp.src('path/to/*.js')
.pipe(compressor())
.pipe(gulp.dest('path/to/output/'));
});// css compressor
gulp.task('css', function () {
gulp.src('path/to/*.css')
.pipe(compressor())
.pipe(gulp.dest('path/to/output/'));
});