bahmutov / pre-git

Automatically install pre-commit / pre-push hooks in your git repo
168 stars 22 forks source link

Be more cautious when rewriting the package.json on install #79

Closed datenreisender closed 8 years ago

datenreisender commented 8 years ago

The install script always puts all config.pre-git entries as well as scripts.commit into the package.json regardless of whether the user already did configure pre-git. This is not nice: If a user wants to leave out some of those config entries, they are inserted again later, e.g. on a later npm install. Thus with this PR the entries are only written to package.json if there is no config.pre-git key yet in it.

bahmutov commented 8 years ago

Cool, thank you, I will test it out before publishing, want to see how it works first, ok?

bahmutov commented 8 years ago

published as 3.8.1 - let me know if there are problems!

datenreisender commented 8 years ago

Awesome. Thanks!