6.0.2 • Published 18 days ago

init-package-json v6.0.2

Weekly downloads
1,699,110
License
ISC
Repository
github
Last release
18 days ago

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.

npm@lerna/createlerna@megasaur/createcordova-libkilli8n-react-native-fast-image@cashremit/cr-streamline-icons@frxf/frxfmbowercogoportutilsgtpmgtmp@mink-opn/build-tokens@infinitebrahmanuniverse/nolb-ini@everything-registry/sub-chunk-1914@beisen/npm@kuinox/testpackagethatnooneshoulduse@kuinox/testpackagethatnooneshoulduseever@limegrass/create-typescript-project@jasonssun/npm@ionic-enterprise/cordova-lib@merna/create@mini-lerna/create@metamask-human/snaps-clireact-picky-with-clearionic-cordova-libindui-cordova-libinit-package-json-parcelsushi-sdk-ftm@ubiquits/toolchainjamuskalimexpress-hex@opn-ooo/eslint-config-opnscarlet-initscaffolding-simple-es6judpackjudpack-lib@websites-kontur/create-sitevinpm@wecity/weshop@zerothstack/toolchainl2forlerna@yoitsro/lerna-createlatest-dev@zalastax/nolb-iniwalk8243-npminitlightswangfan_createwedmasteraceweextoolweexpack-libweextoolshypmtj-npmhubot-budaiedjameslinenode.js1@upradata/npx-initkountexamplesmashygenerator-napi-modulesnaps-cligenerator-typescript-backbone-amd@safely-project/safely-ts@selftang/create@selftang/init@se-yl/npmrefinejs-repo@mcesystems/lernarepo-npm@pubbo/createskivvyhipleygenerator-react-component-magic@salomvary/npmgh-monoproject-cligit-branching-workflow@react-18-pdf/roottanngo@spryker-lerna/create@parallelnft/web3modalshaocongwang@mrauhu/npm@socotra/createstriplettale@nodefactory/snaps-clifixed_form_builder@positionex/position-sdk@erquhart/lerna-create@feelepxyz.github/npmyapmwinx-form-winxluojia-cli-devbedrock-clibpm-initnew.jsbrainpmarti-bundle
6.0.2

18 days ago

6.0.1

19 days ago

6.0.0

7 months ago

5.0.0

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.10.3

6 years ago

1.10.2

6 years ago

1.10.1

7 years ago

1.10.0

7 years ago

1.9.6

7 years ago

1.9.5

7 years ago

1.9.4

8 years ago

1.9.3

8 years ago

1.9.2

8 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

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 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

10 years ago

0.0.14

10 years ago

0.0.13

10 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

11 years ago

0.0.6

11 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