mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
362 B
15 lines
362 B
12 years ago
|
var init = require('./init-package-json.js')
|
||
|
var path = require('path')
|
||
|
var initFile = path.resolve(process.env.HOME, '.npm-init')
|
||
|
var dir = process.cwd()
|
||
|
|
||
|
var npm = require('npm')
|
||
|
npm.load(function (er, npm) {
|
||
|
if (er) throw er
|
||
|
init(dir, initFile, npm.config.get(), function (er, data) {
|
||
|
if (er) throw er
|
||
|
console.log('written successfully')
|
||
|
})
|
||
|
})
|
||
|
|