UNPKG

copy-cli

Version:

A CLI tool for copying files, with optional CSS/JS minification.

22 lines (19 loc) 344 B
'use strict'; var UglifyJS = require('uglify-js'); module.exports = function (data) { var result = UglifyJS.minify(data, { fromString: true, compress: { unsafe: false, screw_ie8: true }, mangle: { keep_fnames: true, screw_ie8: true }, output: { comments: /@license|@preserve|^!/i } }); return result.code; };