Skip to content

Commit 05d8450

Browse files
committed
fix(generator): add comments to src/index.js template
1 parent 9ac31ea commit 05d8450

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/app/__snapshots__/index.test.js.snap

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,11 @@ Object {
167167
`;
168168

169169
exports[`generator:app src/ generates source file based on plugin name 1`] = `
170-
"export default function funTime() {
171-
170+
"/**
171+
* Danger plugin that tells you to have a fun time
172+
*/
173+
export default function funTime() {
174+
// TODO
172175
}
173176
"
174177
`;

src/app/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export default class extends Generator {
161161
this.fs.copy(this.templatePath('babelrc'), this.destinationPath('.babelrc'))
162162

163163
this.fs.copyTpl(this.templatePath('src/**'), this.destinationPath('src'), {
164+
...this.props,
164165
pluginFunctionName,
165166
})
166167

src/app/templates/src/index

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* <%= description %>
3+
*/
14
export default function <%= pluginFunctionName %>() {
2-
5+
// TODO
36
}

0 commit comments

Comments
 (0)