@@ -33,7 +33,6 @@ var fs = require("fs");
3333var path = require ( "path" ) ;
3434var copy = require ( 'architect-build/copy' ) ;
3535var build = require ( 'architect-build/build' ) ;
36- var async = require ( "asyncjs" ) ;
3736
3837var ACE_HOME = __dirname ;
3938var BUILD_DIR = ACE_HOME + "/build" ;
@@ -346,58 +345,57 @@ function buildSubmodule(options, extra, file, callback) {
346345function buildAce ( options ) {
347346 var snippetFiles = jsFileList ( "lib/ace/snippets" ) ;
348347 var modeNames = modeList ( ) ;
349- async . forEach ( [
350- buildCore . bind ( null , options , { outputFile : "ace.js" } ) ,
351- // modes
352- async . forEach . bind ( null , modeNames , function ( name , next ) {
353- buildSubmodule ( options , {
354- projectType : "mode" ,
355- require : [ "ace/mode/" + name ]
356- } , "mode-" + name , next ) ;
357- } ) ,
358- // snippets
359- async . forEach . bind ( null , modeNames , function ( name , next ) {
360- if ( snippetFiles . indexOf ( name + ".js" ) == - 1 )
361- addSnippetFile ( name ) ;
362-
363- buildSubmodule ( options , {
364- require : [ "ace/snippets/" + name ] ,
365- } , "snippets/" + name , next ) ;
366- } ) ,
367- // themes
368- async . forEach . bind ( null , jsFileList ( "lib/ace/theme" ) , function ( name , next ) {
369- buildSubmodule ( options , {
370- projectType : "theme" ,
371- require : [ "ace/theme/" + name ]
372- } , "theme-" + name . replace ( "_theme" , "" ) , next ) ;
373- } ) ,
374- // keybindings
375- async . forEach . bind ( null , [ "vim" , "emacs" ] , function ( name , next ) {
376- buildSubmodule ( options , {
377- projectType : "keybinding" ,
378- require : [ "ace/keyboard/" + name ]
379- } , "keybinding-" + name , next ) ;
380- } ) ,
381- // extensions
382- async . forEach . bind ( null , jsFileList ( "lib/ace/ext" ) , function ( name , next ) {
383- buildSubmodule ( options , {
384- projectType : "ext" ,
385- require : [ "ace/ext/" + name ]
386- } , "ext-" + name , next ) ;
387- } ) ,
388- // workers
389- async . forEach . bind ( null , workers ( "lib/ace/mode" ) , function ( name , next ) {
390- buildSubmodule ( options , {
391- projectType : "worker" ,
392- require : [ "ace/mode/" + name + "_worker" ] ,
393- additional : [ {
394- id : "ace/worker/worker" ,
395- loaderModule : true ,
396- order : - 1000
397- } ] ,
398- } , "worker-" + name , next ) ;
399- } ) ,
400- ] , function ( f , next ) { f ( next ) ; } ) ;
348+
349+ buildCore ( options , { outputFile : "ace.js" } ) ,
350+ // modes
351+ modeNames . forEach ( function ( name ) {
352+ buildSubmodule ( options , {
353+ projectType : "mode" ,
354+ require : [ "ace/mode/" + name ]
355+ } , "mode-" + name ) ;
356+ } ) ;
357+ // snippets
358+ modeNames . forEach ( function ( name ) {
359+ if ( snippetFiles . indexOf ( name + ".js" ) == - 1 )
360+ addSnippetFile ( name ) ;
361+
362+ buildSubmodule ( options , {
363+ require : [ "ace/snippets/" + name ] ,
364+ } , "snippets/" + name ) ;
365+ } ) ;
366+ // themes
367+ jsFileList ( "lib/ace/theme" ) . forEach ( function ( name ) {
368+ buildSubmodule ( options , {
369+ projectType : "theme" ,
370+ require : [ "ace/theme/" + name ]
371+ } , "theme-" + name . replace ( "_theme" , "" ) ) ;
372+ } ) ;
373+ // keybindings
374+ [ "vim" , "emacs" ] . forEach ( function ( name ) {
375+ buildSubmodule ( options , {
376+ projectType : "keybinding" ,
377+ require : [ "ace/keyboard/" + name ]
378+ } , "keybinding-" + name ) ;
379+ } ) ;
380+ // extensions
381+ jsFileList ( "lib/ace/ext" ) . forEach ( function ( name ) {
382+ buildSubmodule ( options , {
383+ projectType : "ext" ,
384+ require : [ "ace/ext/" + name ]
385+ } , "ext-" + name ) ;
386+ } ) ;
387+ // workers
388+ workers ( "lib/ace/mode" ) . forEach ( function ( name ) {
389+ buildSubmodule ( options , {
390+ projectType : "worker" ,
391+ require : [ "ace/mode/" + name + "_worker" ] ,
392+ additional : [ {
393+ id : "ace/worker/worker" ,
394+ loaderModule : true ,
395+ order : - 1000
396+ } ] ,
397+ } , "worker-" + name ) ;
398+ } ) ;
401399}
402400
403401function getLoadedFileList ( options , callback , result ) {
0 commit comments