Skip to content

steel1990/gulp-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gulp-compressor

A gulp plugin for compress html,css and js.

html minify is use htmlcompressor,all configs are valid.

css and js minify is use 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/'));
});

About

gulp plugin for compress html,css and js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published