Fails to run targets with string keys
raddevon opened this issue · comments
With this config:
concurrent: {
options: {
logConcurrentOutput: true
},
debug: ['server:debug', 'node-inspector'],
'debug:production': ['server:debug:production', 'node-inspector'],
'debug:slack': ['server:debug:slack', 'node-inspector'],
test: ['jasmine_nodejs', 'shell:chimp']
},
grunt concurrent:debug:production
instead runs concurrent:debug
. I've changed the config to
concurrent: {
options: {
logConcurrentOutput: true
},
staging: ['server:debug', 'node-inspector'],
production: ['server:debug:production', 'node-inspector'],
slack: ['server:debug:slack', 'node-inspector'],
test: ['jasmine_nodejs', 'shell:chimp']
},
and grunt concurrent:production
works as expected.
Hey! I'll be looking into this issue, if that's ok.
If you don't mind, I'd like to ask a question. From what I understand, grunt does not allow for nested tasks. I was trying to replicate the issue and I realized it didn't solely occur within the 'concurrent' task, but also with any other task:target defined similarly (two colons). Wouldn't this make it a grunt issue rather than a grunt-concurrent issue? Or have you seen other cases of grunt tasks where using more than one colon works correctly?
It seems like grunt is simply discarding any other input that appears after a second colon.
@dominguesgm I indeed think this is a grunt issue or limitation. Defining targets is usually via nested objects and not via a :
, which has a special meaning for grunt.
Having that said, the OP should use other separators such as -
, _
or even using camelCase as demonstrated in the README.