JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q51735F
  • License MIT

Update package.json

Package Exports

  • update-pkg

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (update-pkg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

update-pkg NPM version NPM downloads Build Status

Update package.json

Install

$ npm install --save update-pkg

Usage

const pkg = require('update-pkg')

const data = pkg.data()
data.name = 'fancy-package'
pkg.update(data)

CLI

Install

$ npm install -g update-pkg

Usage

$ update-pkg --name fancy-package

API

.data

Type: function

First argument is dir, the directory to resolve package.json.

Return the content of package.json as object, throw error if not exists. It's basically require('./package.json').

.update

Type: function

First argument is the new data to update package.json to.

Second argument is dir, the directory to resolve package.json.

Return undefined.

License

MIT © EGOIST