diff --git a/ChangeLog.txt b/ChangeLog.txt index 2b1f88bb..224f9326 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,13 @@ +2014.07.01 Version 1.1.4 + +* New Features + - Highlight matching tags (Adam Jimenez) + - Improved jump to matching command (Adam Jimenez) + +* new language modes + - AppleScript (Yaogang Lian) + - Vala + 2014.03.08 Version 1.1.3 * New Features diff --git a/Makefile b/Makefile index 95dcf964..29cf0495 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ pre_build: build: pre_build ./Makefile.dryice.js normal ./Makefile.dryice.js demo - ./Makefile.dryice.js bm # Minimal build: call Makefile.dryice.js only if our sources changed basic: build/src/ace.js diff --git a/Makefile.dryice.js b/Makefile.dryice.js index f8e1383c..2bc36f8b 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -31,14 +31,12 @@ var fs = require("fs"); var path = require("path"); -if (!fs.existsSync) - fs.existsSync = path.existsSync; -else - path.existsSync = fs.existsSync; -var copy = require('dryice').copy; +var copy = require('architect-build/copy'); +var build = require('architect-build/build'); var ACE_HOME = __dirname; var BUILD_DIR = ACE_HOME + "/build"; +var CACHE = {}; function main(args) { if (args.indexOf("updateModes") !== -1) { @@ -49,7 +47,7 @@ function main(args) { if (x[0] == "-" && x[1] != "-") return "-" + x; return x; - }); + }).filter(Boolean); if (args[2] && (args[2][0] != "-" || args[2].indexOf("h") != -1)) type = args[2]; @@ -69,36 +67,22 @@ function main(args) { ace(); } else if (type == "demo") { demo(); - } else if (type == "bm") { - bookmarklet(); } else if (type == "full") { - demo(ace()); - bookmarklet(); + ace(); + demo(); } else if (type == "highlighter") { - var project = buildAce({ - coreOnly: true, - exportModule: "ace/ext/static_highlight", - requires: ["ace/ext/static_highlight", "ace/theme/textmate"], - readFilters: [copy.filter.moduleDefines, function(a) { - console.log(a.substring(0, 2500)) - return a - }] - }) - copy({ - source: project.result, - filter: getWriteFilters(project.options, "main"), - dest: BUILD_DIR + "/static_highlight.js" - }); + // TODO } } +} +function showHelp(type) { 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(" highlighter "); console.log("args:"); @@ -109,91 +93,30 @@ function main(args) { 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() { - var targetDir = BUILD_DIR + "/textarea"; - copy({ - source: "build_support/editor_textarea.html", - dest: targetDir + '/editor.html' - }); - copy({ - source: "build_support/style.css", - dest: targetDir + '/style.css' - }); - - buildAce({ - targetDir: targetDir + "/src", - ns: "__ace_shadowed__", - exportModule: "ace/ext/textarea", - compress: false, - noconflict: true, - suffix: "", - name: "ace-bookmarklet", - workers: [], - keybindings: [] - }); + if (type) + console.log(" output for " + type + " generated in " + BUILD_DIR); } function ace() { - console.log('# ace ---------'); - - // uncompressed - var project = buildAce({ - compress: false, - noconflict: false - }); - buildAce({ - compress: false, - noconflict: true - }); - - // compressed - buildAce({ - compress: true, - noconflict: false - }); - buildAce({ - compress: true, - noconflict: true - }); - console.log('# ace License | Readme | Changelog ---------'); - copy({ - source: ACE_HOME + "/build_support/editor.html", - dest: BUILD_DIR + "/editor.html" - }); - copy({ - source: ACE_HOME + "/LICENSE", - dest: BUILD_DIR + "/LICENSE" - }); - copy({ - source: ACE_HOME + "/ChangeLog.txt", - dest: BUILD_DIR + "/ChangeLog.txt" - }); - - return project; + copy.file(ACE_HOME + "/build_support/editor.html", BUILD_DIR + "/editor.html"); + copy.file(ACE_HOME + "/LICENSE", BUILD_DIR + "/LICENSE"); + copy.file(ACE_HOME + "/ChangeLog.txt", BUILD_DIR + "/ChangeLog.txt"); + + console.log('# ace ---------'); + for (var i = 0; i < 4; i++) + buildAce({compress: i & 2, noconflict: i & 1}); } -function demo(project) { - project = project || buildAce({ - compress: false, - noconflict: false, - coreOnly: true - }); +function demo() { console.log('# kitchen sink ---------'); - var version, ref; + var version = "", ref = ""; try { version = JSON.parse(fs.readFileSync(ACE_HOME + "/package.json")).version; ref = fs.readFileSync(ACE_HOME + "/.git-ref").toString(); - } catch(e) { - ref = ""; - version = ""; - } + } catch(e) {} function changeComments(data) { return (data @@ -204,49 +127,55 @@ function demo(project) { .replace("%version%", version) .replace("%commit%", ref) ); - }; - - function fixDocPaths(data) { - return data.replace(/"(demo|build)\//g, "\""); } + + copy(ACE_HOME +"/demo/kitchen-sink/docs/", BUILD_DIR + "/demo/kitchen-sink/docs/"); + + copy.file(ACE_HOME + "/demo/kitchen-sink/logo.png", BUILD_DIR + "/demo/kitchen-sink/logo.png"); + copy.file(ACE_HOME + "/demo/kitchen-sink/styles.css", BUILD_DIR + "/demo/kitchen-sink/styles.css"); + copy.file(ACE_HOME + "/kitchen-sink.html", BUILD_DIR + "/kitchen-sink.html", changeComments); - copy({ - source: ACE_HOME + "/kitchen-sink.html", - dest: BUILD_DIR + "/kitchen-sink.html", - filter: [changeComments, fixDocPaths] + buildSubmodule({}, { + require: ["kitchen-sink/demo"], + projectType: "demo" + }, BUILD_DIR + "/demo/kitchen-sink/demo"); + + copy(ACE_HOME + "/demo/", BUILD_DIR + "/demo/", { + shallow: true, + exclude: /\s|requirejs/, + include: /\.(js|html)$/, + replace: function(source) { + if (!/^\s*")} + function script(str) {result.push('')} + scripts.forEach(function(s) { + s = s.replace(/"/g, ""); + if (s == "ace/ace") { + comment("load ace"); + script("ace"); + } else { + var extName = s.match(/[^/]*$/)[0]; + comment("load ace " + extName + " extension"); + script("ext-" + extName); + } + }); + result.push(" diff --git a/demo/autoresize.html b/demo/autoresize.html index cc1dc5e3..73a87599 100644 --- a/demo/autoresize.html +++ b/demo/autoresize.html @@ -20,29 +20,41 @@ -
autoresizing editor
+
autoresizing editor
minHeight = 2 lines
+
+

 
-
+
 
 
+
+
 
 
diff --git a/demo/emmet.html b/demo/emmet.html
index 57f13f67..122085d9 100644
--- a/demo/emmet.html
+++ b/demo/emmet.html
@@ -22,19 +22,20 @@
 
 

 
-
-
-
-
-
-
+
+
+
+
 
 
 
diff --git a/demo/ie7.html b/demo/ie7.html
index 3a525f86..f5db8667 100644
--- a/demo/ie7.html
+++ b/demo/ie7.html
@@ -5,7 +5,7 @@
   
   ACE Editor StatusBar Demo