I want to remove comments, but not uglify the code. Is it possible with gulp? Or is this something that requires bower or something else?
Yes, it is possible. For future reference, you should be using the gulp plugin registry. Doing a quick search for 'comments' found this:
var gulp = require('gulp');
var strip = require('gulp-strip-comments');
gulp.task('default', function () {
return gulp.src('template.js')
.pipe(strip())
.pipe(gulp.dest('dist'));
});
https://github.com/RnbWd/gulp-strip-comments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With