special handling for the text plugin
This commit is contained in:
parent
90fe0a4256
commit
2a8e53923a
1 changed files with 14 additions and 15 deletions
|
|
@ -53,6 +53,13 @@ copy({
|
||||||
dest: 'build/editor.html'
|
dest: 'build/editor.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function filterTextPlugin(text) {
|
||||||
|
return text.replace(/(['"])text\!/g, "$1text/");
|
||||||
|
/*return text
|
||||||
|
.replace(/define\(\s*['"]text\!\)/g, "text/")
|
||||||
|
.replace(/require\(\s*['"]text\!\)/g, "text/")*/
|
||||||
|
}
|
||||||
|
|
||||||
var ace = copy.createDataObject();
|
var ace = copy.createDataObject();
|
||||||
copy({
|
copy({
|
||||||
source: [
|
source: [
|
||||||
|
|
@ -85,21 +92,12 @@ copy({
|
||||||
copy({
|
copy({
|
||||||
source: {
|
source: {
|
||||||
root: project,
|
root: project,
|
||||||
include: /.*\.css$|.*\.html$/,
|
include: /.*\.css$/,
|
||||||
exclude: /tests?\//
|
exclude: /tests?\//
|
||||||
},
|
},
|
||||||
filter: [ copy.filter.addDefines ],
|
filter: [ copy.filter.addDefines ],
|
||||||
dest: ace
|
dest: ace
|
||||||
});
|
});
|
||||||
copy({
|
|
||||||
source: {
|
|
||||||
root: project,
|
|
||||||
include: /.*\.png$|.*\.gif$/,
|
|
||||||
exclude: /tests?\//
|
|
||||||
},
|
|
||||||
filter: [ copy.filter.base64 ],
|
|
||||||
dest: ace
|
|
||||||
});
|
|
||||||
copy({
|
copy({
|
||||||
source: [
|
source: [
|
||||||
'build_support/boot.js'
|
'build_support/boot.js'
|
||||||
|
|
@ -111,11 +109,12 @@ copy({
|
||||||
// Create the compressed and uncompressed output files
|
// Create the compressed and uncompressed output files
|
||||||
copy({
|
copy({
|
||||||
source: ace,
|
source: ace,
|
||||||
filter: copy.filter.uglifyjs,
|
filter: [copy.filter.uglifyjs, filterTextPlugin],
|
||||||
dest: 'build/src/ace.js'
|
dest: 'build/src/ace.js'
|
||||||
});
|
});
|
||||||
copy({
|
copy({
|
||||||
source: ace,
|
source: ace,
|
||||||
|
filter: [filterTextPlugin],
|
||||||
dest: 'build/src/ace-uncompressed.js'
|
dest: 'build/src/ace-uncompressed.js'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -181,7 +180,7 @@ project.assumeAllFilesLoaded();
|
||||||
require: [ 'ace/mode/' + mode ]
|
require: [ 'ace/mode/' + mode ]
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
filter: [ copy.filter.debug, copy.filter.moduleDefines, copy.filter.uglifyjs ],
|
filter: [ copy.filter.debug, copy.filter.moduleDefines, copy.filter.uglifyjs, filterTextPlugin ],
|
||||||
dest: "build/src/mode-" + mode + ".js"
|
dest: "build/src/mode-" + mode + ".js"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -213,7 +212,7 @@ copy({
|
||||||
aceHome + "/lib/ace/worker/worker.js",
|
aceHome + "/lib/ace/worker/worker.js",
|
||||||
jsWorker
|
jsWorker
|
||||||
],
|
],
|
||||||
filter: [ copy.filter.uglifyjs ],
|
filter: [ copy.filter.uglifyjs, filterTextPlugin ],
|
||||||
dest: "build/src/worker-javascript.js"
|
dest: "build/src/worker-javascript.js"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -228,7 +227,7 @@ console.log('# ace themes ---------');
|
||||||
root: aceHome + '/lib',
|
root: aceHome + '/lib',
|
||||||
include: "ace/theme/" + theme + ".js"
|
include: "ace/theme/" + theme + ".js"
|
||||||
}],
|
}],
|
||||||
filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs ],
|
filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs, filterTextPlugin ],
|
||||||
dest: "build/src/theme-" + theme + ".js"
|
dest: "build/src/theme-" + theme + ".js"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -243,7 +242,7 @@ project.assumeAllFilesLoaded();
|
||||||
require: [ 'ace/keyboard/keybinding/' + keybinding ]
|
require: [ 'ace/keyboard/keybinding/' + keybinding ]
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs ],
|
filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs, filterTextPlugin ],
|
||||||
dest: "build/src/keybinding-" + keybinding + ".js"
|
dest: "build/src/keybinding-" + keybinding + ".js"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue