diff --git a/addon/ng2/commands/init.js b/addon/ng2/commands/init.js new file mode 100644 index 000000000000..b2deca2278a9 --- /dev/null +++ b/addon/ng2/commands/init.js @@ -0,0 +1,24 @@ +'use strict'; + +var InitCommand = require('ember-cli/lib/commands/init'); + +module.exports = InitCommand .extend({ + availableOptions: [ + { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] }, + { name: 'verbose', type: Boolean, default: false, aliases: ['v'] }, + { name: 'blueprint', type: String, aliases: ['b'] }, + { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] }, + { name: 'skip-bower', type: Boolean, default: true, aliases: ['sb'] }, + { name: 'name', type: String, default: '', aliases: ['n'] } + ], + + _defaultBlueprint: function() { + if (this.project.isEmberCLIAddon()) { + return 'addon'; + } else { + return 'ng2'; + } + }, +}); + +module.exports.overrideCore = true; diff --git a/addon/ng2/index.js b/addon/ng2/index.js index 64ff033de3a8..a262826d4b0a 100644 --- a/addon/ng2/index.js +++ b/addon/ng2/index.js @@ -5,7 +5,8 @@ module.exports = { name: 'ng2', includedCommands: function() { return { - 'new': require('./commands/new') + 'new': require('./commands/new'), + 'init': require('./commands/init') }; } };