-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
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?
var init = require('init-package-json')
var path = require('path')
var initFile = path.resolve(process.env.HOME, '.npm-init')
var dir = process.cwd()
// Desired default settings/options
var configData = {
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
JordanMachado
Metadata
Metadata
Assignees
Labels
No labels