Skip to content

Commit

Permalink
feat(generator): create .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
macklinu committed May 17, 2017
1 parent be7ce94 commit 62cb38d
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ export default class extends Generator {
this.templatePath('editorconfig'),
this.destinationPath('.editorconfig')
)

this.fs.copy(
this.templatePath('gitignore'),
this.destinationPath('.gitignore')
)
}

install() {
Expand Down
7 changes: 6 additions & 1 deletion src/app/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ describe('generator:app', () => {
authorName: 'Macklin Underdown',
authorEmail: '[email protected]',
})
assert.file(['package.json', 'CODE_OF_CONDUCT.md', '.editorconfig'])
assert.file([
'package.json',
'CODE_OF_CONDUCT.md',
'.editorconfig',
'.gitignore',
])
})
describe('CODE_OF_CONDUCT.md', () => {
it('contains author email', async () => {
Expand Down
73 changes: 73 additions & 0 deletions src/app/templates/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Created by https://www.gitignore.io/api/node,visualstudiocode

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# Generated code
dist/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# End of https://www.gitignore.io/api/node,visualstudiocode

0 comments on commit 62cb38d

Please sign in to comment.