Skip to content

Commit

Permalink
Fix gitignore filename bug
Browse files Browse the repository at this point in the history
npm renames .gitignore to .npmignore in the event that a .npmignore file
doesn't exist. This is indented behavior on npm's part. Add special
handling for this case.

See npm/npm#1862
  • Loading branch information
jimf committed Nov 10, 2017
1 parent 9057e1e commit f4e24c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/interpret.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ module.exports = function (tasks) {
return ctx.environment === 'Browser' ||
!path.endsWith('index.html')
},
rename: function (path) {
return path.replace('gitignore', '.gitignore')
},
transform: function () {
return through(function (chunk, enc, done) {
done(null, mustache.render(chunk.toString('utf8'), ctx))
Expand Down
File renamed without changes.

0 comments on commit f4e24c8

Please sign in to comment.