2
我想有發電機,我喜歡的遷移:如何將參數傳遞給像那樣的名字空間的jake任務:任務參數?
jake migration:create <name>
jake migration:remove <name>
jake migration:execute <name>
代碼
namespace('migration', function(){
desc('Create migration file');
task('create', [], function(params) {
console.log(arguments);
//some code for creation
});
desc('Remove migration file');
task('remove', [], function(params) {
console.log(arguments);
//some code for removing
});
desc('Execute migration file');
task('execute', [], function(params) {
console.log(arguments);
//some code for executing
});
});
,但我沒有找到如何通過參數<name>
'namespaced'jake ta內SK。 你能幫我嗎?
UPD: 甚至https://github.com/isaacs/node-jake例子「將參數傳遞給傑克」不工作對我來說,每一次arguments
是空的, 什麼建議嗎?