Ui/ember blueprint updates (#9627)
* Import layout in blueprint if generator used with --in flag * Generated story works with hot reloading out of the box
This commit is contained in:
parent
fb05f1efe8
commit
4eb156f707
|
@ -58,7 +58,7 @@ module.exports = {
|
|||
let contents = '';
|
||||
|
||||
// if we're in an addon, build import statement
|
||||
if (options.project.isEmberCLIAddon() || (options.inRepoAddon && !options.inDummy)) {
|
||||
if (options.project.isEmberCLIAddon() || (options.inRepoAddon && !options.inDummy) || !!options.in) {
|
||||
if (options.pod) {
|
||||
templatePath = './template';
|
||||
} else {
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
import { storiesOf } from '@storybook/ember';
|
||||
<%= importMD %>
|
||||
import { withKnobs } from '@storybook/addon-knobs';
|
||||
|
||||
storiesOf('<%= classifiedModuleName %>', module)
|
||||
.addParameters({ options: { showPanel: true } })
|
||||
.addDecorator(withKnobs())
|
||||
.add(`<%= classifiedModuleName %>`, () => ({
|
||||
template: hbs`
|
||||
<h5 class="title is-5"><%= header %></h5>
|
||||
<<%= classifiedModuleName %>/>
|
||||
`,
|
||||
context: {},
|
||||
}),
|
||||
{notes}
|
||||
);
|
||||
}));
|
||||
|
|
|
@ -38,9 +38,7 @@ module.exports = {
|
|||
locals: function(options) {
|
||||
let contents = '';
|
||||
|
||||
let importMD = "import notes from './" + stringUtil.dasherize(options.entity.name) + ".md';\n";
|
||||
return {
|
||||
importMD: importMD,
|
||||
contents: contents,
|
||||
path: getPathOption(options),
|
||||
header: stringUtil
|
||||
|
|
Loading…
Reference in New Issue