From 2f5e4d83355a1bb7dae85c8d2207e992c971cb17 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Tue, 13 Oct 2009 12:34:33 -0700 Subject: [PATCH] Minor cleanup, much more needed. Reviewed by me. --- AppKit/Themes/Aristo/Jakefile | 2 -- .../CommonJS/objective-j/lib-js/objective-j/jake.js | 12 ++++++++++++ common.jake | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/AppKit/Themes/Aristo/Jakefile b/AppKit/Themes/Aristo/Jakefile index 5e06c4f9a..b3548d913 100644 --- a/AppKit/Themes/Aristo/Jakefile +++ b/AppKit/Themes/Aristo/Jakefile @@ -2,8 +2,6 @@ require("../../../common.jake"); -var blend = require("objective-j/jake/blendtask").blend; - blend("Aristo.blend", function(aristoTask) { diff --git a/Objective-J/CommonJS/objective-j/lib-js/objective-j/jake.js b/Objective-J/CommonJS/objective-j/lib-js/objective-j/jake.js index c7c0067d7..aae44ce87 100644 --- a/Objective-J/CommonJS/objective-j/lib-js/objective-j/jake.js +++ b/Objective-J/CommonJS/objective-j/lib-js/objective-j/jake.js @@ -1,4 +1,7 @@ +var FILE = require("file"); + + var BUNDLE_TASK = require("objective-j/jake/bundletask"); exports.BundleTask = BUNDLE_TASK.BundleTask; @@ -13,3 +16,12 @@ var APPLICATION_TASK = require("objective-j/jake/applicationtask"); exports.ApplicationTask = APPLICATION_TASK.ApplicationTask; exports.app = APPLICATION_TASK.app; + +// This check is only necessary because during the build process blendtask gets created much later. +if (FILE.exists(FILE.join(FILE.dirname(module.path), "jake", "blendtask.j"))) +{ + var BLEND_TASK = require("objective-j/jake/blendtask"); + + exports.BlendTask = BLEND_TASK.BlendTask; + exports.blend = BLEND_TASK.blend; +} diff --git a/common.jake b/common.jake index ca5abd690..e6c807e9c 100644 --- a/common.jake +++ b/common.jake @@ -68,6 +68,9 @@ if(!global.COMMON_DO_ONCE) global.bundle = OBJECTIVE_J_JAKE.bundle; global.framework = OBJECTIVE_J_JAKE.framework; + if (OBJECTIVE_J_JAKE.blend) + global.blend = OBJECTIVE_J_JAKE.blend; + global.BundleTask = OBJECTIVE_J_JAKE.BundleTask; }