Skip to content

Commit

Permalink
[BUGFIX beta] Disable co-location in blueprints
Browse files Browse the repository at this point in the history
The supporting code in `ember-cli-htmlbars` required to make this
work is currently gated behind the Octane flag.
  • Loading branch information
chancancode committed Sep 16, 2019
1 parent ee8a894 commit 5140be9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions blueprints/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ module.exports = {
},
{
name: 'component-structure',
type: ['flat', 'nested', 'classic'],
type: OCTANE ? ['flat', 'nested', 'classic'] : ['classic'],
default: OCTANE ? 'flat' : 'classic',
aliases: [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }],
aliases: OCTANE ? [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }] : [{ cs: 'classic' }],
},
],

Expand All @@ -60,7 +60,15 @@ module.exports = {
option.default = '@ember/component';
}
} else if (option.name === 'component-structure') {
option.default = isOctane ? 'flat' : 'classic';
if (isOctane) {
option.type = ['flat', 'nested', 'classic'];
option.default = 'flat';
option.aliases = [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }];
} else {
option.type = ['classic'];
option.default = 'classic';
option.aliases = [{ cs: 'classic' }];
}
}
});

Expand Down

0 comments on commit 5140be9

Please sign in to comment.