fix demo build
This commit is contained in:
parent
20a7a6307d
commit
a2d34bf291
1 changed files with 30 additions and 18 deletions
|
|
@ -66,8 +66,7 @@ function main(args) {
|
||||||
} else if (type == "bm") {
|
} else if (type == "bm") {
|
||||||
bookmarklet();
|
bookmarklet();
|
||||||
} else if (type == "full") {
|
} else if (type == "full") {
|
||||||
ace();
|
demo(ace());
|
||||||
demo();
|
|
||||||
bookmarklet();
|
bookmarklet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -120,7 +119,7 @@ function ace() {
|
||||||
console.log('# ace ---------');
|
console.log('# ace ---------');
|
||||||
|
|
||||||
// uncompressed
|
// uncompressed
|
||||||
buildAce({
|
var project = buildAce({
|
||||||
compress: false,
|
compress: false,
|
||||||
noconflict: false
|
noconflict: false
|
||||||
});
|
});
|
||||||
|
|
@ -153,9 +152,16 @@ function ace() {
|
||||||
source: ACE_HOME + "/ChangeLog.txt",
|
source: ACE_HOME + "/ChangeLog.txt",
|
||||||
dest: BUILD_DIR + "/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 ---------');
|
console.log('# kitchen sink ---------');
|
||||||
|
|
||||||
var version, ref;
|
var version, ref;
|
||||||
|
|
@ -185,7 +191,7 @@ function demo() {
|
||||||
copy({
|
copy({
|
||||||
source: ACE_HOME + "/kitchen-sink.html",
|
source: ACE_HOME + "/kitchen-sink.html",
|
||||||
dest: BUILD_DIR + "/kitchen-sink.html",
|
dest: BUILD_DIR + "/kitchen-sink.html",
|
||||||
filter: [changeComments, fixDocPaths]
|
filter: [changeComments, fixDocPaths]
|
||||||
});
|
});
|
||||||
|
|
||||||
copy({
|
copy({
|
||||||
|
|
@ -202,20 +208,17 @@ function demo() {
|
||||||
});
|
});
|
||||||
|
|
||||||
var demo = copy.createDataObject();
|
var demo = copy.createDataObject();
|
||||||
|
|
||||||
|
project.assumeAllFilesLoaded();
|
||||||
copy({
|
copy({
|
||||||
source: ACE_HOME + "/demo/kitchen-sink/demo.js",
|
source: [{
|
||||||
dest: demo,
|
project: cloneProject(project),
|
||||||
filter: [changeComments, fixDocPaths, function(data) {
|
require: [ "kitchen-sink/demo" ]
|
||||||
return data.replace("define(", "define('kitchen-sink/demo',");
|
}],
|
||||||
}]
|
filter: getWriteFilters({filters:[fixDocPaths]}, "demo"),
|
||||||
});
|
dest: demo
|
||||||
copy({
|
|
||||||
source: ACE_HOME + "/lib/ace/split.js",
|
|
||||||
dest: demo,
|
|
||||||
filter: [changeComments, function(data) {
|
|
||||||
return data.replace("define(", "define('ace/split',");
|
|
||||||
}]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
copy({
|
copy({
|
||||||
source: demo,
|
source: demo,
|
||||||
dest: BUILD_DIR + "/kitchen-sink/demo.js",
|
dest: BUILD_DIR + "/kitchen-sink/demo.js",
|
||||||
|
|
@ -253,6 +256,9 @@ function getWriteFilters(options, projectType) {
|
||||||
removeLicenceComments
|
removeLicenceComments
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (options.filters)
|
||||||
|
filters = filters.concat(options.filters);
|
||||||
|
|
||||||
if (projectType == "worker")
|
if (projectType == "worker")
|
||||||
return filters;
|
return filters;
|
||||||
|
|
||||||
|
|
@ -319,6 +325,9 @@ var buildAce = function(options) {
|
||||||
filter: [ copy.filter.moduleDefines ],
|
filter: [ copy.filter.moduleDefines ],
|
||||||
dest: ace
|
dest: ace
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (options.coreOnly)
|
||||||
|
return project;
|
||||||
|
|
||||||
copy({
|
copy({
|
||||||
source: ace,
|
source: ace,
|
||||||
|
|
@ -426,6 +435,8 @@ var buildAce = function(options) {
|
||||||
dest: BUILD_DIR + '/ace-min.js'
|
dest: BUILD_DIR + '/ace-min.js'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return project;
|
||||||
};
|
};
|
||||||
|
|
||||||
// silence annoying messages from dryice
|
// silence annoying messages from dryice
|
||||||
|
|
@ -437,8 +448,9 @@ var buildAce = function(fn) {
|
||||||
return;
|
return;
|
||||||
log.apply(console, arguments);
|
log.apply(console, arguments);
|
||||||
}
|
}
|
||||||
fn.apply(null, arguments);
|
var ret = fn.apply(null, arguments);
|
||||||
console.log = log;
|
console.log = log;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}(buildAce);
|
}(buildAce);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue