Welcome to mirror list, hosted at ThFree Co, Russian Federation.

example-npm.js « example « init-package-json « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b394eeabc04b5a8e97befa7f9ffde31feec61262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var init = require('../init-package-json.js')
var path = require('path')
var dir = process.cwd()
var npm = require('npm')

npm.load(function (er, npm) {
  if (er) throw er
  init(dir, npm.config.get('init-module'), npm.config, function (er, data) {
    if (er) throw er
    console.log('written successfully')
  })
})