Skip to content

Commit

Permalink
feat(new command): override ember-cli's new command with better defaults
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
rodyhaddad committed Jul 24, 2015
1 parent e94e681 commit c0801d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions addon/ng2/commands/new.js
@@ -0,0 +1,17 @@
'use strict';

var NewCommand = require('ember-cli/lib/commands/new');

module.exports = NewCommand.extend({
availableOptions: [
{ name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
{ name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
{ name: 'blueprint', type: String, default: 'ng2', aliases: ['b'] },
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
{ name: 'skip-bower', type: Boolean, default: true, aliases: ['sb'] },
{ name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
{ name: 'directory', type: String , aliases: ['dir'] }
]
});

module.exports.overrideCore = true;
7 changes: 6 additions & 1 deletion addon/ng2/index.js
Expand Up @@ -2,5 +2,10 @@
'use strict';

module.exports = {
name: 'ng2'
name: 'ng2',
includedCommands: function() {
return {
'new': require('./commands/new')
};
}
};

0 comments on commit c0801d5

Please sign in to comment.