javascript - How do I remove logs from console.log in ionic? -


i wish build , distribute app built ionic. however, re-initialising console.log()'s not producing desired effect.

i have tried reinit console.log function there still logs in application.

var console = {}; console.log = function(){}; window.console = console; 

you use gulp accomplish this.

gulp-strip-debug gulp plugin strips console.log()'s, console.info(), debugger,... statements.

here's example how gulpfile.js should like:

var gulp = require('gulp'); var stripdebug = require('gulp-strip-debug');  gulp.task('strip-debug', function () {     // build location folder     // strip stuff in these files.     return gulp.src('src/js/*')         .pipe(stripdebug())         // location output of 'stripped' files         // in case, should same build destination         .pipe(gulp.dest('dist/js/')); }); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -