Open calebeby opened 7 years ago
Sure, agreed. Interested in pull requesting this in?
Sure I can. Assuming it'll be two PRs, one for spike-core
, one for spike
?
So I think I'll change this function: https://github.com/static-dev/spike-core/blob/master/lib/index.js#L153 to be a generic installDeps
which accepts a parameter that is 'npm' or 'yarn', and defaults to 'npm'.
yep, that seems about right!
Is there any kind of global spike config?
Can I store the default install tool with the default template?
Hey sorry for the late response here -- yeah you can, global config is right in the main js file here:
https://github.com/static-dev/spike-core/blob/master/lib/index.js#L301
@jescalan How do I create a cli flag that does not need a keyword after it?
Right now I have:
s.addArgument(['--yarn', '-y'], {
help: 'Use yarn rather than npm to install dependencies'
});
and it says
usage: spike new [-h] [--yarn YARN] [--template TEMPLATE]
[--overrides OVERRIDES]
path
spike new: error: argument "--yarn/-y": Expected one argument. null
I want to just be able to say --yarn
and have it use yarn. Any ideas?
I figured it out :smile: I had to use nargs: 0
Hi @jescalan, I think it would be nice if when you run
spike new
it would have the option to install dependencies using yarn rather than npm, or at least give the option to not install dependencies.Thanks!