From 688e669361eeda40a8e957ae21f74bdd328b4407 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 9 Nov 2011 11:30:41 +0100 Subject: [PATCH] use dry ice from npm --- .gitmodules | 5 +---- Makefile.dryice.js | 47 ++++++++++++++++++++++++++++++++++++---------- package.json | 8 +++----- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/.gitmodules b/.gitmodules index 1eeb5560..0e3f48e0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "doc/wiki"] path = doc/wiki - url = git://github.com/ajaxorg/ace.wiki.git -[submodule "node_modules/dryice"] - path = node_modules/dryice - url = git://github.com/ajaxorg/dryice.git \ No newline at end of file + url = git://github.com/ajaxorg/ace.wiki.git \ No newline at end of file diff --git a/Makefile.dryice.js b/Makefile.dryice.js index ec8a39d9..f471ed11 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -88,10 +88,13 @@ var aceHome = __dirname; console.log('# ace ---------'); -var aceProject = [ - aceHome + '/lib', - aceHome -]; +var aceProject = { + roots: [ + aceHome + '/lib', + aceHome + ], + textPluginPattern: /^ace\/requirejs\/text!/ +} if (target == "normal") { //aceProject.push(aceHome + '/demo'); @@ -135,7 +138,8 @@ copy({ project: project, require: [ "ace/lib/fixoldbrowsers", - "ace/ace" + "ace/ace", + "pilot/index" // MIGRATION API ] }) ], @@ -218,7 +222,7 @@ project.assumeAllFilesLoaded(); copy({ source: [ copy.source.commonjs({ - project: project.clone(), + project: cloneProject(project), require: [ 'ace/mode/' + mode ] }) ], @@ -272,9 +276,12 @@ console.log('# ace worker ---------'); ["javascript", "coffee", "css"].forEach(function(mode) { console.log("worker for " + mode + " mode"); var worker = copy.createDataObject(); - var workerProject = copy.createCommonJsProject([ - aceHome + '/lib' - ]); + var workerProject = copy.createCommonJsProject({ + roots: [ + aceHome + '/lib' + ], + textPluginPattern: /^ace\/requirejs\/text!/ + }); copy({ source: [ copy.source.commonjs({ @@ -308,7 +315,7 @@ project.assumeAllFilesLoaded(); copy({ source: [ copy.source.commonjs({ - project: project.clone(), + project: cloneProject(project), require: [ 'ace/keyboard/keybinding/' + keybinding ] }) ], @@ -381,3 +388,23 @@ function demo() { dest: 'build/demo/kitchen-sink/kitchen-sink.js' }); } + + +// TODO: replace with project.clone once it is fixed in dryice +function cloneProject(project) { + var clone = copy.createCommonJsProject({ + roots: project.roots, + ignores: project.ignoreRequires + }); + + Object.keys(project.currentFiles).forEach(function(module) { + clone.currentFiles[module] = project.currentFiles[module]; + }); + + Object.keys(project.ignoredFiles).forEach(function(module) { + clone.ignoredFiles[module] = project.ignoredFiles[module]; + }); + + return clone; +}; + diff --git a/package.json b/package.json index ef75c5fe..01b0aca7 100644 --- a/package.json +++ b/package.json @@ -11,16 +11,14 @@ "url" : "http://github.com/ajaxorg/ace.git" }, "dependencies": { - "mime": ">=1.2.1" + "mime": "1.2.x" }, "devDependencies": { "asyncjs": "0.0.x", - "uglify-js": "1.1.x", "jsdom": "0.1.x", - "htmlparser": "1.7.x", - "mime": "1.2.x", "amd-loader": "0.0.x", - "libxml": "0.0.x" + "libxml": "0.0.x", + "dryice": ">=0.3.0" }, "licenses": [{