Skip to content
Browse files

Added option to not minify the generated sources, this makes debuggin…

…g easier
  • Loading branch information...
1 parent b4ee8fe commit f6ad3136dfb0d752a0e28a3e77ff771ec10f3fae Steven Devijver committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 bin/nools
View
5 bin/nools
@@ -12,7 +12,11 @@ var nools = require(".."),
function uglify(source) {
try {
+ if (program.no_minification) {
+ return source;
+ } else {
return uglifyjs.minify(source, {fromString: true, mangle: false, output: {beautify: true}}).code;
+ }
} catch (e) {
console.error(e.message);
console.error(e.stack);
@@ -28,6 +32,7 @@ program.command("compile")
.description("compile nools dsl")
.option("-n --name [value]", "name of the flow to compile, defaults to the name of the file less the extension")
.option("-l --nools_location [value]", "location to look for nools when requiring it")
+ .option("-u --no_minification", "Do not minify the generated script")
.action(function () {
var files = Array.prototype.slice.call(arguments);
var program = files.pop();

0 comments on commit f6ad313

Please sign in to comment.
Something went wrong with that request. Please try again.