Open navneetgarg123 opened 9 years ago
I'd like to wrap all of my jake tasks in a function that takes a singular parameter that passes that given to data to the task and do whatever I wish.
jakelib/mytask.jake
function(injector) { desk('Some custom task') task('something', function() { console.log(injector.something) });
Jakefile
var injector = { something: 'Hello world!' }; //Here's where i'd like to load the tasks and pass my injector object jake.loadTasksWith(injector);
Is there an interface to make this possible?
How is this different from just setting an environment variable when you run Jake?
$ jake fooTask myEnvironmentVariable=bar
I'd like to wrap all of my jake tasks in a function that takes a singular parameter that passes that given to data to the task and do whatever I wish.
jakelib/mytask.jake
Jakefile
Is there an interface to make this possible?