diff --git a/adapters/minifiers.coffee b/adapters/minifiers.coffee index 481ecc5..328c7df 100644 --- a/adapters/minifiers.coffee +++ b/adapters/minifiers.coffee @@ -4,9 +4,13 @@ module.exports = new Adapter js: (file, cb) -> uglify = require 'uglify-js' + + options = Adapter.getOptions this + options.fromString = true + file.read (code) -> if uglify.minify? # uglify > 2.0 - res = uglify.minify(code, { fromString: true }).code + res = uglify.minify(code, options).code else # old API { parser: jsp, uglify: pro } = uglify res = pro.gen_code pro.ast_squeeze pro.ast_mangle jsp.parse code @@ -14,6 +18,11 @@ module.exports = new Adapter css: (file, cb) -> csso = require 'csso' + + options = Adapter.getOptions this, { + restructure: false + } + file.read (code) -> - res = csso.justDoIt code + res = csso.justDoIt code, options.restructure cb res \ No newline at end of file