diff --git a/lib/index.js b/lib/index.js index 83887a6..356a21a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -140,6 +140,11 @@ module.exports = class CLI extends EventEmitter { help: 'Where to create your project' }) + s.addArgument(['--yarn', '-y'], { + help: 'Use yarn rather than npm to install dependencies', + nargs: 0 + }) + s.addArgument(['--template', '--tpl', '-t'], { help: 'The template to use for your project. See "spike tpl" for more.' }) diff --git a/lib/new.js b/lib/new.js index d9bbd60..e7ddaa7 100644 --- a/lib/new.js +++ b/lib/new.js @@ -14,7 +14,8 @@ module.exports = function (Spike, args) { emitter: emitter, locals: args.overrides, template: args.template, - inquirer: inquirer.prompt.bind(inquirer) + inquirer: inquirer.prompt.bind(inquirer), + tool: args.yarn ? 'yarn' : undefined })) return emitter