You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My code example (below) is pretty much exactly what was taken from the README file, just with less comments and the configData populated differently.
I thought that passing an object to the 3rd parameter of the init method would provide it with default options, but I guess thats not the case?
varinit=require('init-package-json')varpath=require('path')varinitFile=path.resolve(process.env.HOME,'.npm-init')vardir=process.cwd()// Desired default settings/optionsvarconfigData={name: 'Default Name..',description: 'Default description..',some: 'extra stuff'// What is this one even suppose to do then?..}init(dir,initFile,configData,(er,data)=>{console.log('Result:',err||data)})
Is there a way to provide default options? Short of creating the package.json manually
Thanks
The text was updated successfully, but these errors were encountered:
My code example (below) is pretty much exactly what was taken from the README file, just with less comments and the
configData
populated differently.I thought that passing an object to the 3rd parameter of the
init
method would provide it with default options, but I guess thats not the case?Is there a way to provide default options? Short of creating the package.json manually
Thanks
The text was updated successfully, but these errors were encountered: