Tuesday 30 May 2017

Exclude package-lock.json from GitHub contribution activity

Now that npm v5.0.0 is out, using npm packages auto-generates a package-lock.json on npm install. In my case, my package-lock.json file happens to be a close to 10,000 lines of code.

package-lock.json

Npm also suggests that this file should be committed:

npm notice created a lockfile as package-lock.json. You should commit this file.

I don't want this file to be included in the line counts for the contribution activity on GitHub.

Setting the files as vendored code in .gitattributes only affects the repository language.

Is there a way to exclude a file from the contribution activity without adding it to .gitignore?



via mythereal

No comments:

Post a Comment