diff --git a/.gitignore b/.gitignore index 59ec847b..813d6c10 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,9 @@ .DS_Store *.swp *.tmp -*~ # Project files that should not be in the repo .* -\#* !/.gitignore .*.gz *.tmTheme.js diff --git a/.gitmodules b/.gitmodules index 07bbe371..4678c516 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "doc/wiki"] path = doc/wiki - url = https://github.com/ajaxorg/ace.wiki.git + url = git://github.com/ajaxorg/ace.wiki.git [submodule "build"] path = build - url = https://github.com/ajaxorg/ace-builds.git + url = git://github.com/ajaxorg/ace-builds.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 062af59c..c44edcb0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,9 +7,16 @@ Feel free to fork and improve/enhance Ace any way you want. If you feel that the There are two versions of the agreement: -1. [The Individual CLA](https://docs.google.com/a/c9.io/forms/d/1MfmfrxqD_PNlNsuK0lC2KSelRLxGLGfh_wEcG0ijVvo/viewform): use this version if you're working on the Cloud9 SDK or open source projects in your spare time, or can clearly claim ownership of copyright in what you'll be submitting. -2. [The Corporate CLA](https://docs.google.com/a/c9.io/forms/d/1vFejn4111GdnCNuQ6BfnJDaxdsUEMD4KCo1ayovAfu0/viewform): have your corporate lawyer review and submit this if your company is going to be contributing to the Cloud9 SDK and/or open source projects. +1. [The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting. +2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects -If you want to contribute to the Cloud9 SDK and/or open source projects please go to the online form, fill it out and submit it. +If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email. -Happy coding, Cloud9 +Email: ace+cla@c9.io + +Fax: +31 (0) 206388953 + +Address: Ajax.org B.V. + Keizersgracht 241 + 1016 EA, Amsterdam + the Netherlands \ No newline at end of file diff --git a/ChangeLog.txt b/ChangeLog.txt index 3077d171..d4f5e1d1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,103 +1,4 @@ -Version 1.2.0-pre - -* New Features - - Indented soft wrap (danyaPostfactum) - -* API Changes - - unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745) - - "change" event listeners on session and editor get delta objects directly - -2015.04.03 Version 1.1.9 - - - Small Enhancements and Bugfixes - -2014.11.08 Version 1.1.8 - -* API Changes - - `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid - -* New Features - - Improved autoindent for html and php modes (Adam Jimenez) - - Find All from searchbox (Colton Voege) - -* new language modes - - Elixir, Elm - -2014.09.21 Version 1.1.7 - -* Bugfixes - - fix several bugs in autocompletion - - workaround for inaccurate getBoundingClientRect on chrome 37 - -2014.08.17 Version 1.1.6 - -* Bugfixes - - fix regression in double tap to highlight - - Improved Latex Mode (Daniel Felder) - -* API Changes - - editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that) - -* new language modes - - Praat (José Joaquín Atria) - - Eiffel (Victorien Elvinger) - - G-code (Adam Joseph Cook) - -2014.07.09 Version 1.1.5 - -* Bugfixes - - fix regression in autocomplete popup - -* new language modes - - gitignore (Devon Carew) - -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 - - Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman) - - Add ColdFusion behavior (Abram Adams) - - add showLineNumbers option - - Add html syntax checker (danyaPostfactum) - -* new language modes - - Gherkin (Patrick Nevels) - - Smarty - -2013.12.02 Version 1.1.2 - -* New Features - - Accessibility Theme for Ace (Peter Xiao) - - use snipetManager for expanding emmet snippets - - update jshint to 2.1.4 - - improve php syntax checker (jdalegonzalez) - - add option for autoresizing - - add option for autohiding vertical scrollbar - - improvements to highlighting of xml like languages (danyaPostfactum) - - add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others) - - add option to merge similar changes in undo history - - add scrollPastEnd option - - use html5 dragndrop for text dragging (danyaPostfactum) - -* API Changes - - fixed typo in HashHandler commmandManager - -* new language modes - - Nix (Zef Hemel) - - Protobuf (Zef Hemel) - - Soy - - Handlebars - -2013.06.04 Version 1.1.1 +2013.06.04 Version 1.1.01 - Improved emacs keybindings (Robert Krahn) - Added markClean, isClean methods to UndoManager (Joonsoo Jeon) diff --git a/Makefile b/Makefile index 29cf0495..95dcf964 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ 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 0ce7c657..14ffea23 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -31,23 +31,22 @@ var fs = require("fs"); var path = require("path"); -var copy = require('architect-build/copy'); -var build = require('architect-build/build'); +if (!fs.existsSync) + fs.existsSync = path.existsSync; +else + path.existsSync = fs.existsSync; +var copy = require('dryice').copy; var ACE_HOME = __dirname; var BUILD_DIR = ACE_HOME + "/build"; -var CACHE = {}; function main(args) { - if (args.indexOf("updateModes") !== -1) { - return updateModes(); - } var type = "minimal"; args = args.map(function(x) { 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]; @@ -67,24 +66,22 @@ function main(args) { ace(); } else if (type == "demo") { demo(); + } else if (type == "bm") { + bookmarklet(); } else if (type == "full") { - ace(); - demo(); - } else if (type == "highlighter") { - // TODO + demo(ace()); + bookmarklet(); } } -} -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(" full all of above"); - console.log(" highlighter "); + 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:"); @@ -93,34 +90,94 @@ function showHelp(type) { console.log(" --nc namespace require"); console.log(" --s shrinkwrap (combines all output files into one)"); console.log(""); - if (type) - console.log(" output for " + type + " generated in " + BUILD_DIR); + 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: [] + }); } 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.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}); + 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; } -function demo() { +function demo(project) { + project = project || buildAce({ + compress: false, + noconflict: false, + coreOnly: true + }); 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) {} + } catch(e) { + ref = ""; + version = ""; + } function changeComments(data) { return (data - .replace("doc/site/images/ace-logo.png", "demo/kitchen-sink/ace-logo.png") .replace(//g, "") .replace(/PACKAGE\-\->|")} - 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("
- + \ No newline at end of file diff --git a/build b/build index a4e495d8..995de31e 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit a4e495d8901876c6bafe3870a35cb8e32c827e97 +Subproject commit 995de31e6513ddfd5e9f66b8216f5b316fcd2253 diff --git a/build_support/editor.html b/build_support/editor.html index 1d972cf9..06a4651b 100644 --- a/build_support/editor.html +++ b/build_support/editor.html @@ -8,8 +8,8 @@ body { overflow: hidden; } - - #editor { + + #editor { margin: 0; position: absolute; top: 0; @@ -27,7 +27,7 @@ alert("Ace Rocks " + items[i]); } } - + diff --git a/demo/autoresize.html b/demo/autoresize.html index b0464ecd..cc1dc5e3 100644 --- a/demo/autoresize.html +++ b/demo/autoresize.html @@ -7,62 +7,42 @@ -autoresizing editor+
autoresizing editor
minHeight = 2 lines- - - - - + - -