The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
how to npm init create private: true by default?
is there any way (npm set config, …) to let npm init add the property “private” to package.json by default?
I do not find direct support, it is not one of the listed properties for init: https://docs.npmjs.com/misc/config
$ npm config ls -l | grep init init-author-email = "" init-author-name = "" init-author-url = "" init-license = "ISC" init-module = "/Users/john/.npm-init.js" init-version = "1.0.0"
Thanks - that can be used as simple as “npm init private”! Nice.
Unfortunately it’s missing other settings like author name a.s.o. :-(