Is there any way to reverse the javascript minification?

2

Once the file has been mined using, for example, uglifyJS can you make it readable again?

If yes, how?

obs: I use GulpJS as task runner

    
asked by anonymous 09.11.2015 / 13:19

2 answers

4

Having a minified file there is no way to know what the name of the variables and functions had before.

It is possible to reformat for the indentation to be correct, but do not "guess" the old names.

To reformat, using Gulp, I found this plugin (gulp-indent) .

var indent = require("gulp-indent");

gulp.src("./src/*.ext")
    .pipe(indent({
        tabs:true,
    amount:1
    }))
    .pipe(gulp.dest("./dist"));
    
09.11.2015 / 13:23
0

If you just want to reverse the minification for debugging purposes, the chrome and firefox debuggers are able to reindent the minified code for you.

    
27.11.2015 / 23:35