Answer the question
In order to leave comments, you need to log in
What is gulp plugin for obfuscation of html code?
I tried this one https://www.npmjs.com/package/gulp-obfuscate and it doesn't work, it only acts on js files, here is my 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']);
Answer the question
In order to leave comments, you need to log in
like this
eywXRywHRywnQywXcywXMywXexwHexw3dxwndxwnexwXQxwHRxw3QxwnQxwXdxw3cxw3NywXbxwHbxw3axw3MywnbxwHdxw3bxwncxwXcxwHcxwXRxwnRxwXVxwHfUFDfTFDfSFDfWFDfyIDfaFDfwIDfnwFXcxCWxwSUxwyJcxFX7kSKshyYxgSWuE2OpkGK0EjLvtTXwsVKnwFXcxFXcx1dnwFXcxFXcxFKzEjLh1zbgg2OpETMuEGK5tyJcxFXcxFXc1jWmcCXcxFXcxFXrkiZx4SYok3KnwFXcxFXcxVPnFjJnwFXcxFXcx1KnwFXcxFXcxVQ9Q0PvgkLX9yL6EWMnwFXcxFXcxVPlFjLptTKnwFXcxFXcxVOnwFXcxFXcxFKwEjLh1Tagg2OnwFXcxFXcxlMlkzL2UiMlg1L2UCNlITJ1EzL2USMlETJxUSMlQTJyUSOvYTJyUyMlQmL2EzLj9yMlUTJmViYlETJxUSMlETJxUSMlETJxUCNlITJ58iNlITJzUCZuITMvM2LzUS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question