Skip to content

Commit

Permalink
fix(generator): add comments to src/index.js template
Browse files Browse the repository at this point in the history
  • Loading branch information
macklinu committed May 17, 2017
1 parent 9ac31ea commit 05d8450
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,11 @@ Object {
`;

exports[`generator:app src/ generates source file based on plugin name 1`] = `
"export default function funTime() {
"/**
* Danger plugin that tells you to have a fun time
*/
export default function funTime() {
// TODO
}
"
`;
Expand Down
1 change: 1 addition & 0 deletions src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default class extends Generator {
this.fs.copy(this.templatePath('babelrc'), this.destinationPath('.babelrc'))

this.fs.copyTpl(this.templatePath('src/**'), this.destinationPath('src'), {
...this.props,
pluginFunctionName,
})

Expand Down
5 changes: 4 additions & 1 deletion src/app/templates/src/index
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* <%= description %>
*/
export default function <%= pluginFunctionName %>() {

// TODO
}

0 comments on commit 05d8450

Please sign in to comment.