Пробовал вот этот
https://www.npmjs.com/package/gulp-obfuscate и не работает,он только действует на js файлы, вот мой gulpfile.js
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
plumber = require('gulp-plumber'),
livereload = require('gulp-livereload'),
prefix = require('gulp-autoprefixer'),
jade = require('gulp-jade'),
obfuscate = require('gulp-obfuscate'),
concatCss = require('gulp-concat-css'),
minifyCSS = require('gulp-minify-css');
// jadephp = require('gulp-jade-php');
//Scripts Task
//Uglifies
gulp.task('scripts',function(){
gulp.src('js/*.js')
.pipe(plumber())
.pipe(uglify())
.pipe(gulp.dest('output/minjs'));
});
//Styles Task
//Sass
gulp.task('sass',function(){
gulp.src('scss/**/*.scss')
.pipe(plumber())
.pipe(sass({
style: 'compressed' // is not working
}))
.pipe(prefix('last 10 versions'))
.pipe(obfuscate())
.pipe(gulp.dest('output/css/'))
.pipe(livereload());
});
//Minify css
gulp.task('minifycss',function(){
gulp.src('output/css/*.css')
.pipe(minifyCSS({keepBreaks:false}))
.pipe(gulp.dest('output/css/'))
});
//Watch Task JS,Sass,Jade
gulp.task('watch',function(){
livereload.listen();
gulp.watch('js/*.js', ['scripts']) //**.*.js
gulp.watch('scss/**/*.scss', ['sass']);
gulp.watch('jade/*.jade', ['jade']);
gulp.watch('output/css/*.css',['minifycss']);
});
//Simple Jade task
gulp.task('jade', function() {
gulp.src('jade/*.jade')
.pipe(plumber())
.pipe(jade())
//.pipe(obfuscate())
.pipe(gulp.dest('output'))
});
//Obfuscate html
gulp.task('obfuscate', function () {
gulp.src('output/*.html')
.pipe(obfuscate());
});
gulp.task('default',['scripts','sass','jade','minifycss','obfuscate','watch']);