npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Exclude files on update


I’ve got a npm-package with an “user.json”-file. When a user installs that package for the first time the file should be downloaded from the repository.

But as soon as the user just installs an update of the package and a holder version is already installed the file should not be downloaded again to the client.

Is there any possibility of doing this?

Thanks for your help

Do you know about npm-scripts, which can run before and after commands?

Does user.json get modified from the downloaded version? If so, I find it is useful to name the original version something different (like say user.template.json) so you can treat the original and edited version differently in .gitignore et al.