1.0.0 • Published 7 years ago

sync-package-description v1.0.0

Weekly downloads
9
License
VOL
Repository
github
Last release
7 years ago

sync-package-description

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.

install

The normal way:

npm install sync-package-description

use

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))

api: SyncDescription(authorization[, options]) : callable(path)

authorization

Must be an authentication object.

options

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.

path

Pass in the path to the module containing the package.json file.

license

Published and released under the VOL.

<3