Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
sipmann committed Nov 27, 2019
1 parent 45912dc commit 3921054
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ module.exports = class extends Generator {
{ appname: this.appname, gituser: this.gituser }
);

this.fs.copyTpl(
this.templatePath('gitignore'),
this.destinationPath('.gitignore'),
{ appname: this.appname, gituser: this.gituser }
);

let indexName = 'index.jsx';
let storeName = 'store.jsx';
if (this.typescript) {
Expand Down
4 changes: 4 additions & 0 deletions generators/app/templates/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
.cache/
.vscode/
2 changes: 1 addition & 1 deletion test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('generator without everything', function () {
});

it('generates a project with react router', () => {
assert.file(['package.json', '.babelrc', 'index.html', 'src/index.jsx']);
assert.file(['package.json', '.babelrc', 'index.html', 'src/index.jsx', '.gitignore']);
assert.jsonFileContent('package.json', {"name": "foo"});
assert.noFileContent('src/index.jsx', '../css/app.scss');
assert.noFileContent('src/index.jsx', '<Router>');
Expand Down

0 comments on commit 3921054

Please sign in to comment.