3.0.0 • Published 6 years ago

modify-pkg-up v3.0.0

Weekly downloads
7
License
ISC
Repository
github
Last release
6 years ago

Build Status JavaScript Style Guide

modify-pkg-up

Helps you modify the nearest package.json

Why?

How?

Example

const modifyPkgUp = require('modify-pkg-up')
modifyPkgUp((packageJson) => {
  return Object.assign(packageJson, {
    //
  })
}).then(() => console.log('done'))

API

modifyPkgUp(modifierFn)

  • modifierFn: A function that receives the current contents of package.json. It may return the new contents, or a promise for them.

Returns an empty promise.