how to npm init create private: true by default?

Hi,
is there any way (npm set config, …) to let npm init add the property “private” to package.json by default?
Thanks
Jeff

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"

I did find: https://github.com/shanewholloway/npm-create-private

Thanks - that can be used as simple as “npm init private”! Nice.

Unfortunately it’s missing other settings like author name a.s.o. :-(

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.