add 6to5-minify

This commit is contained in:
Sebastian McKenzie
2015-02-04 08:23:49 +11:00
parent 6da6bc3eb8
commit c228d76e44
8 changed files with 57 additions and 29 deletions

7
bin/6to5-minify Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env node
var opts = require("./6to5").opts;
opts.optional = (opts.optional || []).concat("minification");
opts.format = {
compact: true
};

View File

@@ -114,12 +114,17 @@ exports.opts = {
loose: commander.loose
};
var fn;
setTimeout(function () {
// this is just a hack to give `6to5-minify` and other files including this
// time to modify `exports.opts`
if (commander.outDir) {
fn = require("./dir");
} else {
fn = require("./file");
}
var fn;
fn(commander, filenames, exports.opts);
if (commander.outDir) {
fn = require("./dir");
} else {
fn = require("./file");
}
fn(commander, filenames, exports.opts);
}, 0);