I'm heavily using `npm version`, but prefer to edit manually anything else.
 
It's mainly because I don't like to pin down dependencies, and make open semver ranges like '>=1.2.3'. That's where comments in package.json come in, when some dependency version is known to be buggy, package.json is the right place to comment and explain that.
 
A year ago I didn't use npm commands at all because npm is used to rewrite the entire package.json with custom formatting. I'm working to change that (see require('jju').update), but it is in development yet.
 
Anyway, `npm version` has one big advantage. It sets git tags. That's why I'm using it, so I don't forget to tag something. But `npm i --save` don't have any significant advantage, so I usually add it manually.
 
Instead of `npm init` I just copy an existing package metadata from somewhere and change it. This way I control everything from author name up to a wonderful wtfpl license location. Yeah I'm sure pkginit can do that, but what can be simpler than copy&edit, really?
 
 
14.01.2014, 18:57, "José F. Romaniello" <[email protected]>:

I saw this few months ago, and I had one question how many times do you change your package.json manually? I use:

  • npm i module —save (or —save-dev)
  • npm remove module —save

  • npm version patch/minor/major

And things like that which does not only change the package but do the required action, but download the module, commit the version change etc.

Also, worth checking substactak/pkginit if you npm init a lot, since it allows you to create templates.

 


2014/1/14 Alex Kocharin <[email protected]>
Mark,
 
One maintains an npm fork - https://github.com/rlidwka/yapm - and happily uses package.yaml forgetting that package.json ever existed. It was an experiment a year ago, but right now I can't even imagine how I would use package.json without an ability to comment anything. :)
 
As for any other config file, it's a fair point. A lot of packages use json as a configuration file just because it's simple, but when they grow they usually change to something more appropriate. Sadly, it's usually cjson (commented json), but I really like to see something more advanced instead.
 
Most packages use _javascript_ object as a config, take node-http-proxy for example. You require() it and pass a custom-made object defined somewhere of your choice. All my production servers use executable _javascript_ for writing configuration as well, because it allows greater flexibility.
 
I'm trying to remember config formats for standalone tools... Grunt and similar tools use _javascript_ (or coffeescript in case of cake), JSHint - cjson, Sinopia - yaml, npm - ini (I wonder, did someone thought about why npm uses ini instead of json for a config?). Meteor uses package.js, that's where I envy them sometimes, you can do awesome things on install. Maybe bower still uses json in bowerrc? I don't use it though. pm2 uses json as well, but it's managed automatically and don't cause trouble.
 
So yes, I read a lot of JSON files in mongodb interface or in traffic dumps from REST services, but I don't remember writing them, there are always more convenient tools.
 
 
Regards,
alex
 
14.01.2014, 12:38, "Mark Hahn" <[email protected]>:
If you're updating JSON by hand, you're doing it wrong. No exceptions.

I don't understand.  How does one maintain a file like package.json or any other config file?


On Mon, Jan 13, 2014 at 10:07 PM, Alex Kocharin <[email protected]> wrote:
 
> JSON scripts are for GUIs so they can be updated by hand or a GUI.
 
If you're updating JSON by hand, you're doing it wrong. No exceptions.
 
 
14.01.2014, 03:03, "mgutz" <[email protected]>:
gee - simpler builds using gulp filters
 
 
* gulp filters (node streams)
* autowatch (-w flag)
* display errors and continue when watching
* build modes
* imperative or declaractive (JSON) project scripts
 
JSON scripts are for GUIs so they can be updated by hand or a GUI. Undecided whether 
to create a standalone app like CodeKit or custom build of Adobe Brackets?
 
Any feedback appreciated
 

 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to