Synchronize an npm package.json description to Github.
For help setting this up as a git hook, see the cli version.
This module takes an
authentication object
and a local module path, and proceeds to update the Github repo
description with the values from the package.json
file.
The normal way:
npm install sync-package-description
Create an instance with the authentication object:
const SyncDescription = require('sync-package-description')
const auth = {
type: 'token',
token: '<SECRET TOKEN>'
}
const sync = SyncDescription(auth)
Then call it with the path to your module:
sync('./')
.then(() => console.log('success!'))
.catch(error => console.log('error!', error))
Must be an authentication object.
The Github module is called with sensible default options, but if you need to pass in special options this is where to do it.
Passed in options will override the default options using Object.assign
.
Pass in the path to the module containing the package.json
file.
Published and released under the VOL.
<3