From 34f3cac4a82e4b53a66b9799cc5c05dff67cc535 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 24 May 2012 11:57:29 +0400 Subject: [PATCH] reorganize build and demo Conflicts: Makefile.dryice.js --- Makefile.dryice.js | 142 +++++--- build_support/editor.html | 4 +- demo/kitchen-sink/demo.js | 616 ++++++++++++++++++++--------------- demo/kitchen-sink/styles.css | 4 +- kitchen-sink.html | 70 ++-- package.json | 2 +- 6 files changed, 486 insertions(+), 352 deletions(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 89f89b1c..da119177 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -38,6 +38,8 @@ * ***** END LICENSE BLOCK ***** */ var fs = require("fs"); +if (!fs.existsSync) + fs.existsSync = require("path").existsSync; var copy = require('dryice').copy; var ACE_HOME = __dirname; @@ -47,10 +49,9 @@ function main(args) { if (args.length == 3) { target = args[2]; // Check if 'target' contains some allowed value. - if (target != "normal" && target != "bm" && target != "demo") { - target = null; + if (!/^(normal|bm|demo|minimal)$/.test(target)) + target = "help"; } - } if (target == "help") { console.log("--- Ace Dryice Build Tool ---"); @@ -107,7 +108,7 @@ function bookmarklet(aceProject) { exportModule: "ace/ext/textarea", compress: false, noconflict: true, - suffix: ".js", + suffix: "", name: "ace-bookmarklet", workers: [], keybindings: [] @@ -121,13 +122,13 @@ function ace(aceProject) { buildAce(aceProject, { compress: false, noconflict: false, - suffix: "-uncompressed", + suffix: "", name: "ace" }); buildAce(aceProject, { compress: false, noconflict: true, - suffix: "-uncompressed-noconflict", + suffix: "-noconflict", name: "ace", workers: [] }); @@ -136,14 +137,14 @@ function ace(aceProject) { buildAce(aceProject, { compress: true, noconflict: false, - suffix: "", + suffix: "-min", name: "ace", workers: [] }); buildAce(aceProject, { compress: true, noconflict: true, - suffix: "-noconflict", + suffix: "-min-noconflict", name: "ace", workers: [] }); @@ -179,33 +180,65 @@ function demo(aceProject) { ref = ""; version = ""; } - - copy({ - source: "kitchen-sink.html", - dest: "build/kitchen-sink.html", - filter: [ function(data) { + var changeComments = function(data) { return (data .replace("DEVEL-->", "") .replace("", "") .replace(" +