From 4f7c10c21793697f5b3a74f5046d80fb490bb360 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Wed, 12 Sep 2012 12:22:59 -0700 Subject: [PATCH 1/4] Mionr updates to dryice --- Makefile.dryice.js | 51 +++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index f7396e39..de43b0e9 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -55,7 +55,8 @@ function main(args) { if (type == "minimal") { buildAce({ compress: args.indexOf("--m") != -1, - noconflict: args.indexOf("--nc") != -1 + noconflict: args.indexOf("--nc") != -1, + shrinkwrap: args.indexOf("--s") != -1 }); } else if (type == "normal") { ace(); @@ -68,24 +69,27 @@ function main(args) { demo(); bookmarklet(); } - - console.log("--- Ace Dryice Build Tool ---"); - console.log(""); - console.log("Options:"); - console.log(" normal Runs embedded build of Ace"); - console.log(" demo Runs demo build of Ace"); - console.log(" bm Runs bookmarklet build of Ace"); - console.log(" full all of above"); - console.log("flags:"); - console.log(" -m minify"); - console.log(" -nc namespace require"); - console.log(" --target ./path path to build folder"); - console.log(""); - if (BUILD_DIR) - console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR) - - process.exit(0); - + else { + console.log("--- Ace Dryice Build Tool ---"); + console.log(""); + console.log("Options:"); + console.log(" minimal Places all necessary Ace files out in build dir [default]"); + console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min"); + console.log(" demo Runs demo build of Ace"); + console.log(" bm Runs bookmarklet build of Ace"); + console.log(" full all of above"); + console.log("args:"); + console.log(" --target ./path path to build folder"); + console.log("flags: (only valid on minimal builds)"); + console.log(" --m minify"); + console.log(" --nc namespace require"); + console.log(" --s shrinkwrap (combines all output files into one)"); + console.log(""); + if (BUILD_DIR) + console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR) + + process.exit(0); + } } function bookmarklet() { @@ -399,6 +403,15 @@ function buildAce(options) { }); }); + + console.log('# combining files into one ---------'); + + if(options.shrinkwrap) { + copy({ + source: { root:targetDir }, + dest: BUILD_DIR + '/ace-min.js' + }); + } } // TODO: replace with project.clone once it is fixed in dryice From ff4e200dc90a448092413940d5335e72301da945 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Wed, 12 Sep 2012 12:27:11 -0700 Subject: [PATCH 2/4] Update help text --- Makefile.dryice.js | 76 +++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index de43b0e9..86a2ce81 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -52,44 +52,44 @@ function main(args) { if (i != -1 && args[i+1]) BUILD_DIR = args[i+1]; - if (type == "minimal") { - buildAce({ - compress: args.indexOf("--m") != -1, - noconflict: args.indexOf("--nc") != -1, - shrinkwrap: args.indexOf("--s") != -1 - }); - } else if (type == "normal") { - ace(); - } else if (type == "demo") { - demo(); - } else if (type == "bm") { - bookmarklet(); - } else if (type == "full") { - ace(); - demo(); - bookmarklet(); - } - else { - console.log("--- Ace Dryice Build Tool ---"); - console.log(""); - console.log("Options:"); - console.log(" minimal Places all necessary Ace files out in build dir [default]"); - console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min"); - console.log(" demo Runs demo build of Ace"); - console.log(" bm Runs bookmarklet build of Ace"); - console.log(" full all of above"); - console.log("args:"); - console.log(" --target ./path path to build folder"); - console.log("flags: (only valid on minimal builds)"); - console.log(" --m minify"); - console.log(" --nc namespace require"); - console.log(" --s shrinkwrap (combines all output files into one)"); - console.log(""); - if (BUILD_DIR) - console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR) - - process.exit(0); + if (args.indexOf("--h") == -1) { + if (type == "minimal") { + buildAce({ + compress: args.indexOf("--m") != -1, + noconflict: args.indexOf("--nc") != -1, + shrinkwrap: args.indexOf("--s") != -1 + }); + } else if (type == "normal") { + ace(); + } else if (type == "demo") { + demo(); + } else if (type == "bm") { + bookmarklet(); + } else if (type == "full") { + ace(); + demo(); + bookmarklet(); + } } + + console.log("--- Ace Dryice Build Tool ---"); + console.log(""); + console.log("Options:"); + console.log(" minimal Places necessary Ace files out in build dir; uses configuration flags below [default]"); + console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min"); + console.log(" demo Runs demo build of Ace"); + console.log(" bm Runs bookmarklet build of Ace"); + console.log(" full all of above"); + console.log("args:"); + console.log(" --target ./path path to build folder"); + console.log("flags:"); + console.log(" --h print this help"); + console.log(" --m minify"); + console.log(" --nc namespace require"); + console.log(" --s shrinkwrap (combines all output files into one)"); + console.log(""); + if (BUILD_DIR) + console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR) } function bookmarklet() { @@ -406,7 +406,7 @@ function buildAce(options) { console.log('# combining files into one ---------'); - if(options.shrinkwrap) { + if (options.shrinkwrap) { copy({ source: { root:targetDir }, dest: BUILD_DIR + '/ace-min.js' From 5b1c51f03e3288d19ce52978fb397a891dec7bcd Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Wed, 12 Sep 2012 15:47:01 -0700 Subject: [PATCH 3/4] Add exception for workers --- Makefile.dryice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 86a2ce81..7a80e6a7 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -408,7 +408,7 @@ function buildAce(options) { if (options.shrinkwrap) { copy({ - source: { root:targetDir }, + source: { root:targetDir, exclude:/^worker-/ }, dest: BUILD_DIR + '/ace-min.js' }); } From a6fbdb10b867930cb422ab9785c0f9c3f46e9204 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Wed, 12 Sep 2012 15:48:16 -0700 Subject: [PATCH 4/4] Add \- --- Makefile.dryice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 7a80e6a7..6c55a5bd 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -408,7 +408,7 @@ function buildAce(options) { if (options.shrinkwrap) { copy({ - source: { root:targetDir, exclude:/^worker-/ }, + source: { root:targetDir, exclude:/^worker\-/ }, dest: BUILD_DIR + '/ace-min.js' }); }