Skip to content

Commit eb83cf3

Browse files
committed
fix: Only look for blueprints on generate from our blueprint directory.
Fixes angular#266
1 parent 78005d3 commit eb83cf3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

addon/ng2/commands/generate.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import * as EmberGenerateCommand from 'ember-cli/lib/commands/generate';
2+
import * as path from 'path';
3+
4+
5+
const GenerateCommand = EmberGenerateCommand.extend({
6+
name: 'generate',
7+
8+
lookupBlueprint: function(name) {
9+
return Blueprint.lookup(name, {
10+
paths: [path.join(__dirname, '..', 'blueprints')]
11+
});
12+
},
13+
});
14+
15+
16+
module.exports = GenerateCommand;
17+
module.exports.overrideCore = true;

addon/ng2/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
includedCommands: function() {
77
return {
88
'new' : require('./commands/new'),
9+
'generate' : require('./commands/generate.ts'),
910
'init' : require('./commands/init'),
1011
'test' : require('./commands/test'),
1112
'e2e' : require('./commands/e2e'),

0 commit comments

Comments
 (0)