diff --git a/.gitmodules b/.gitmodules index 0e3f48e0..5c78725c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "doc/wiki"] path = doc/wiki - url = git://github.com/ajaxorg/ace.wiki.git \ No newline at end of file + url = git://github.com/ajaxorg/ace.wiki.git +[submodule "build"] + path = build + url = https://github.com/ajaxorg/ace-builds.git diff --git a/Makefile b/Makefile index 54312a73..579259d1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY : doc build clean dist -build: +pre_build: git rev-parse HEAD > .git-ref mkdir -p build/src mkdir -p build/demo/kitchen-sink @@ -9,7 +9,8 @@ build: cp -r demo/kitchen-sink/styles.css build/demo/kitchen-sink/styles.css cp demo/kitchen-sink/logo.png build/demo/kitchen-sink/logo.png cp -r doc/site/images build/textarea - + +build: pre_build ./Makefile.dryice.js normal ./Makefile.dryice.js demo ./Makefile.dryice.js bm diff --git a/Makefile.dryice.js b/Makefile.dryice.js index f87cd5ee..3b53a2db 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -38,61 +38,66 @@ * ***** END LICENSE BLOCK ***** */ var fs = require("fs"); +if (!fs.existsSync) + fs.existsSync = require("path").existsSync; var copy = require('dryice').copy; var ACE_HOME = __dirname; +var BUILD_DIR = "build"; function main(args) { - var target = "minimal"; - if (args.length == 3) { - target = args[2]; - // Check if 'target' contains some allowed value. - if (target != "normal" && target != "bm" && target != "demo") { - target = null; - } - } + var type = "minimal"; + args = args.map(function(x) { + if (x[0] == "-" && x[1] != "-") + return "-" + x; + return x; + }); + + if (args[2] && (args[2][0] != "-" || args[2].indexOf("h") != -1)) + type = args[2]; - if (target == "help") { - console.log("--- Ace Dryice Build Tool ---"); - console.log(""); - console.log("Options:"); - console.log(" minimal Runs minimal build of Ace"); - console.log(" normal Runs embedded build of Ace"); - console.log(" demo Runs demo build of Ace"); - console.log(" bm Runs bookmarklet build of Ace"); - process.exit(0); - } + var i = args.indexOf("--target"); + if (i != -1 && args[i+1]) + BUILD_DIR = args[i+1]; - var aceProject = { - roots: [ - ACE_HOME + '/lib', - ACE_HOME + '/demo' - ], - textPluginPattern: /^ace\/requirejs\/text!/ - }; - - if (target == "minimal") { - buildAce(aceProject, { - compress: false, - noconflict: false, - suffix: "", - compat: true, - name: "ace" + if (type == "minimal") { + buildAce({ + compress: args.indexOf("--m") != -1, + noconflict: args.indexOf("--nc") != -1 }); + } else if (type == "normal") { + ace(); + } else if (type == "demo") { + demo(); + } else if (type == "bm") { + bookmarklet(); + } else if (type == "full") { + ace(); + demo(); + bookmarklet(); } - if (target == "normal") { - ace(aceProject); - } - else if (target == "demo") { - demo(aceProject); - } - else if (target == "bm") { - bookmarklet(aceProject); - } + + 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); + } -function bookmarklet(aceProject) { - var targetDir = "build/textarea"; +function bookmarklet() { + var targetDir = BUILD_DIR + "/textarea"; copy({ source: "build_support/editor_textarea.html", dest: targetDir + '/editor.html' @@ -102,56 +107,40 @@ function bookmarklet(aceProject) { dest: targetDir + '/style.css' }); - buildAce(aceProject, { + buildAce({ targetDir: targetDir + "/src", ns: "__ace_shadowed__", exportModule: "ace/ext/textarea", compress: false, noconflict: true, - suffix: ".js", - compat: false, + suffix: "", name: "ace-bookmarklet", workers: [], keybindings: [] }); } -function ace(aceProject) { +function ace() { console.log('# ace ---------'); // uncompressed - buildAce(aceProject, { + buildAce({ compress: false, - noconflict: false, - suffix: "-uncompressed", - compat: true, - name: "ace" + noconflict: false }); - buildAce(aceProject, { + buildAce({ compress: false, - noconflict: true, - suffix: "-uncompressed-noconflict", - compat: true, - name: "ace", - workers: [] + noconflict: true }); // compressed - buildAce(aceProject, { + buildAce({ compress: true, - noconflict: false, - suffix: "", - compat: true, - name: "ace", - workers: [] + noconflict: false }); - buildAce(aceProject, { + buildAce({ compress: true, - noconflict: true, - suffix: "-noconflict", - compat: true, - name: "ace", - workers: [] + noconflict: true }); console.log('# ace License | Readme | Changelog ---------'); @@ -174,7 +163,7 @@ function ace(aceProject) { }); } -function demo(aceProject) { +function demo() { console.log('# kitchen sink ---------'); var version, ref; @@ -185,74 +174,111 @@ 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(" - - + + diff --git a/api/anchor.html b/api/anchor.html index b886f630..4b8d347d 100644 --- a/api/anchor.html +++ b/api/anchor.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/background_tokenizer.html b/api/background_tokenizer.html index 5380ec80..f1d0637c 100644 --- a/api/background_tokenizer.html +++ b/api/background_tokenizer.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/document.html b/api/document.html index ca7de45b..c6a162ee 100644 --- a/api/document.html +++ b/api/document.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/edit_session.html b/api/edit_session.html index e092110a..b5536b53 100644 --- a/api/edit_session.html +++ b/api/edit_session.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/editor.html b/api/editor.html index e2569cc9..c5725498 100644 --- a/api/editor.html +++ b/api/editor.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/index.html b/api/index.html index 6696b726..e1572a3a 100644 --- a/api/index.html +++ b/api/index.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/multi_select.html b/api/multi_select.html index 7d1db650..49be8126 100644 --- a/api/multi_select.html +++ b/api/multi_select.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/placeholder.html b/api/placeholder.html index 00cd688f..661efe05 100644 --- a/api/placeholder.html +++ b/api/placeholder.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/range.html b/api/range.html index 0e1690b9..b00a1b67 100644 --- a/api/range.html +++ b/api/range.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/resources/csses/ace_api.css b/api/resources/csses/ace_api.css index eed01b4e..b703b26b 100644 --- a/api/resources/csses/ace_api.css +++ b/api/resources/csses/ace_api.css @@ -132,28 +132,6 @@ blockquote p{ left: 210px; } -.masthead { - background: #101010 url(../images/dashed_back.png) repeat 0 0; -} -.masthead .container { - /*width: 680px;*/ - padding-left: 285px; - margin: 0 auto; - color: white; -} -.jumbotron { - min-width: 1000px; - padding-top: 40px; - position: relative; -} - -.jumbotron .inner { -/* background: transparent url(../images/header-back.png) top center;*/ - padding: 45px 0; -/* -webkit-box-shadow: inset 0 10px 30px rgba(0,0,0,.3); - -moz-box-shadow: inset 0 10px 30px rgba(0,0,0,.3);*/ -} - .headerTitle { position: relative; top: 100px; @@ -545,10 +523,6 @@ header.filler { margin-left: 30px; } -#mainContent .hero-unit { - background: rgba(255, 255, 255, 0.5); -} - #documentation { padding-bottom: 10px; } @@ -688,6 +662,7 @@ li.signature { .signature-call { cursor: pointer; } + .signature-call a { color: #8e487e; } @@ -777,8 +752,6 @@ li.signature { .table-striped tbody tr:nth-child(even) td, .table-striped tbody tr:nth-child(even) th { background-color: #fbfbfb; } -.table-striped tbody tr:hover td, .table-striped tbody tr:hover th { -} .argument-list { margin-bottom : 13px; diff --git a/api/resources/javascripts/ga.js b/api/resources/javascripts/ga.js index f0035835..e381972d 100644 --- a/api/resources/javascripts/ga.js +++ b/api/resources/javascripts/ga.js @@ -1,5 +1,5 @@ var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-18736001-1']); + _gaq.push(['_setAccount', 'UA-31998201-1']); _gaq.push(['_trackPageview']); (function() { diff --git a/api/resources/javascripts/ux.js b/api/resources/javascripts/ux.js index 49557601..53e6c0fe 100644 --- a/api/resources/javascripts/ux.js +++ b/api/resources/javascripts/ux.js @@ -52,7 +52,6 @@ $(function () { // init prettyprint $('pre > code').addClass('prettyprint'); prettyPrint(); - }); $(document).ready(function () { diff --git a/api/scrollbar.html b/api/scrollbar.html index 75249b08..917b5279 100644 --- a/api/scrollbar.html +++ b/api/scrollbar.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/search.html b/api/search.html index f604715a..80a9656b 100644 --- a/api/search.html +++ b/api/search.html @@ -1,6 +1,6 @@ - - + + diff --git a/api/selection.html b/api/selection.html index 77553b89..1fbd7a4e 100644 --- a/api/selection.html +++ b/api/selection.html @@ -1,6 +1,6 @@ - - + + @@ -112,7 +112,7 @@