Removes
console
oralert
functions in your scripts.
Install package with NPM and add it to your development dependencies:
npm install --save-dev gulp-walc
var walc = require('gulp-walc');
gulp.task('clean', function() {
return gulp.src('app/*.js')
.pipe(walc({console:'comment'}))
.pipe(gulp.dest('dist'));
});
-
console
: Pass'ignore'
or'comment'
, default is'remove'
. -
alert
: Idemconsole
.
If no options object is passed, 'remove'
action will be executed.