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
是空的, 什么建议吗?