init-package-json
A node module to get your node module started
Last updated 3 years ago by gar .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install init-package-json 
SYNC missed versions from official npm registry.

init-package-json

A node module to get your node module started.

Usage

const init = require('init-package-json')
const path = require('path')

// a path to a promzard module.  In the event that this file is
// not found, one will be provided for you.
const initFile = path.resolve(process.env.HOME, '.npm-init')

// the dir where we're doin stuff.
const dir = process.cwd()

// extra stuff that gets put into the PromZard module's context.
// In npm, this is the resolved config object.  Exposed as 'config'
// Optional.
const configData = { some: 'extra stuff' }

// Any existing stuff from the package.json file is also exposed in the
// PromZard module as the `package` object.  There will also be three
// vars for:
// * `filename` path to the package.json file
// * `basename` the tip of the package dir
// * `dirname` the parent of the package dir

const data = await init(dir, initFile, configData)
// the data's already been written to {dir}/package.json
// now you can do stuff with it

See PromZard for details about what can go in the config file.

Current Tags

  • 5.0.0                                ...           latest (2 years ago)

61 Versions

  • 5.0.0                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 3.0.2                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.5                                ...           3 years ago
  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           3 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.10.3                                ...           7 years ago
  • 1.10.2                                ...           7 years ago
  • 1.10.1                                ...           7 years ago
  • 1.10.0                                ...           7 years ago
  • 1.9.6                                ...           7 years ago
  • 1.9.5                                ...           8 years ago
  • 1.9.4                                ...           8 years ago
  • 1.9.3                                ...           9 years ago
  • 1.9.2                                ...           9 years ago
  • 1.9.1                                ...           9 years ago
  • 1.9.0                                ...           9 years ago
  • 1.8.0                                ...           9 years ago
  • 1.7.1                                ...           9 years ago
  • 1.7.0                                ...           9 years ago
  • 1.6.1                                ...           9 years ago
  • 1.6.0                                ...           9 years ago
  • 1.5.0                                ...           9 years ago
  • 1.4.2                                ...           9 years ago
  • 1.4.1                                ...           9 years ago
  • 1.4.0                                ...           10 years ago
  • 1.3.2                                ...           10 years ago
  • 1.3.1                                ...           10 years ago
  • 1.3.0                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.3                                ...           10 years ago
  • 1.1.2                                ...           10 years ago
  • 1.1.1                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.17                                ...           10 years ago
  • 0.0.16                                ...           10 years ago
  • 0.0.15                                ...           11 years ago
  • 0.0.14                                ...           11 years ago
  • 0.0.13                                ...           11 years ago
  • 0.0.11                                ...           11 years ago
  • 0.0.10                                ...           11 years ago
  • 0.0.9                                ...           11 years ago
  • 0.0.8                                ...           11 years ago
  • 0.0.7                                ...           12 years ago
  • 0.0.6                                ...           12 years ago
  • 0.0.5                                ...           12 years ago
  • 0.0.4                                ...           12 years ago
  • 0.0.3                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (4)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |