EndangeredMassa / npub

publisher for node.js projects
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Reinstall node_modules before publish #24

Closed jkrems closed 9 years ago

jkrems commented 9 years ago

It would be great if npub would enforce a clean install of node_modules at the very beginning (maybe as an opt-in config in package.json?). The installation should use the registry in publishConfig by default.

Background

Right now we have the following in all our package.json scripts:

    "setup": "rm -rf node_modules && npm install --registry ${npm_package_publishConfig_registry}",
    "release-patch": "npm run setup && npub publish patch",
    "release-minor": "npm run setup && npub publish minor",
    "release-major": "npm run setup && npub publish major"

It would be great if we could switch to just running npub publish patch and be done with it. :)

EndangeredMassa commented 9 years ago

Sounds good. I'm fine defaulting this behavior and using a config option to turn it off if you want. Maybe cleanInstallModules or something.