nodejitsu / jitsu

Flawless command line deployment of your Node.js apps to the cloud
http://github.com/nodejitsu/jitsu
MIT License
646 stars 93 forks source link

Option to avoid writing to package.json #502

Open ELLIOTTCABLE opened 10 years ago

ELLIOTTCABLE commented 10 years ago

I understand why Nodejitsu needs to define a new "patch version" for new deploys; but my project's package.json is versioned, and is also not formatted the way jitsu insists on formatting JSON. This basically means with each deploy, I have to jitsu deploy to figure out what the patch-number Nodejitsu wants is, terminate the command before it stomps on my file, manually update the patch number, re-issue jitsu deploy, and then revert the file to the patch-number-less format in the repository.

Since npm pack is being used, and the patch-number needs to exist in the package, my suggestion for a solution is thus: copy the entire directory to a temp-location, minus the obviously-ignored node_modules; modify the package.json in the temp directory, npm pack that, and then ship that package off to Nodejitsu.

Obviously, this could / should be under a flag. The simplest usage-flow for most users is simply to let package.json be managed by tools like npm and jitsu for them; those of us manually maintaining it are the outliers.

baer commented 10 years ago

I completely agree - I'm happy to do any package.json modifications required but I DO NOT WANT this to re-write my entire package.json file. I don't want my name on that diff :)