systemjs / builder

SystemJS build tool
MIT License
465 stars 122 forks source link

builder.bundle -> options -> uglify -> beautify should be called **output** #689

Open CxRes opened 8 years ago

CxRes commented 8 years ago

Since you are providing a way to pass options to Uglify directly (separate from SystemJS Builder defaults) these should be consistent with UglifyJS.minify(). minify() has no option beautify but has output^. This is passed in your code to ast.print_to_string(outputOptions) which is the same as what minify does internally$ except for this name discrepancy. See lines 106-113 in lib/output.js.

To be consistent with uglifyJS this must be changed.

^ output has an option beautify inside. $ print_to_string() is a wrapper for function OutputStream() which is what minify invokes directly.

guybedford commented 8 years ago

Thanks for pointing this out. A PR here to ensure better consistency is very welcome.

guybedford commented 8 years ago

We should likely also include mangle here as in https://github.com/systemjs/builder/pull/708.