mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 08:06:16 +00:00
The callback variable was not set if the call to initilize was synchronous. It is now set before so both sync and async will work
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
require("../../../common.jake");
|
|
|
|
const path = require("path");
|
|
|
|
var callback;
|
|
|
|
function callbackFunction(blendtask) {
|
|
callback(blendtask);
|
|
}
|
|
|
|
$BUILD_CJS_BLENDTASK = path.join($BUILD_CJS_CAPPUCCINO, "lib", "cappuccino", "jake", "blendtask.j");
|
|
|
|
var promise = new Promise((resolve, reject) => {
|
|
callback = function(BLEND_TASK) {
|
|
exports.BlendTask = BLEND_TASK.BlendTask;
|
|
exports.blend = BLEND_TASK.blend;
|
|
defineBlendTask().then(() => {
|
|
resolve();
|
|
delete exports.jakePromise;
|
|
});
|
|
}
|
|
});
|
|
|
|
require("../../../CommonJS/lib/cappuccino/jake.js").initilize(callbackFunction);
|
|
|
|
async function defineBlendTask() {
|
|
await exports.blend ("Aristo.blend", function(aristoTask)
|
|
{
|
|
aristoTask.setBuildIntermediatesPath(path.join($BUILD_DIR, "Aristo.build", $CONFIGURATION))
|
|
aristoTask.setBuildPath(path.join($BUILD_DIR, $CONFIGURATION));
|
|
|
|
aristoTask.setThemeDescriptors(new FileList("ThemeDescriptors.j"));
|
|
aristoTask.setIdentifier("com.280n.blend.Aristo");
|
|
aristoTask.setResources(new FileList("Resources/*"));
|
|
});
|
|
task ("build", ["Aristo.blend"]);
|
|
}
|
|
|
|
exports.jakePromise = promise;
|