3.0.0 • Published 6 years ago
modify-pkg-up v3.0.0
modify-pkg-up
Helps you modify the nearest package.json
Why?
- Reads closest
package.json
and writes to it.
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 ofpackage.json
. It may return the new contents, or a promise for them.
Returns an empty promise.