nps
nps copied to clipboard
point `default` to named script
This is not really a problem, more of a question.
Can I have something like
module.exports = {
build: 'yarn some-build-cmd',
dev: 'yarn some-other-cmd',
default: // <-- here goes a way to point to `dev`
}
Basically I would like to have a named script, and to point to it as the default.
This would mostly be useful in cases like
{
ios: {
alpha: {
x: 'bla alpha',
nonX: 'blu alpha',
},
beta: {
x: 'bla beta',
nonX: 'blu beta',
},
},
default: // some way to point to ios.alpha.nonX
}
I don't see any problems with this request. Looks good to me.
Perhaps I'm missing something, but couldn't this be achieved by directly calling the desired script from default
?
e.g.
module.exports = {
build: 'yarn some-build-cmd',
dev: 'yarn some-other-cmd',
default: 'nps build'
}
This will result in nps logging two separate script executions to the console, but I can't imagine that an additional configuration would be more succinct.
I suppose that this wouldn't work very well in a case where you wanted to pass dynamic arguments from the command line to the 2nd named script.
🤔 I guess that makes sense, but it would be nice to have support for args. hmm