beginpm-license
Add a license file to your module.
This is meant to be used with beginpm,
but you can probably use it anywhere!
use
It's not very complicated:
const license = require('beginpm-license')
const cwd = '/path/to/module'
const options = {
license: 'MIT',
date: '2017',
holder: 'Tobias Davis',
filename: 'LICENSE.txt'
}
license({ cwd }, options)
.then(() => {
})
options
license
(string, required)
The identifier of the license. Supported licenses are:
Feel free to add more license files in a pull request to master
!
If the property does not match a known license, the promise
will reject with the error UNRECOGNIZED_LICENSE
.
date
(string, may be required)
If the license requires a date, this property will be
required. It must be a pre-formatted string.
If the property is required but not provided, the promise
will reject with the error DATE_PROPERTY_REQUIRED
.
holder
(string, may be required)
If the license requires a name, this property will be
required. It must be a pre-formatted string.
If the property is required but not provided, the promise
will reject with the error HOLDER_PROPERTY_REQUIRED
.
filename
(string, default LICENSE.txt
)
You may specify a filename, for example LICENSE.txt
.
contributing
Open a pull request to the master
branch with your favored license!
Hopefully there is enough here for you to figure out what to do, but
feel free to open an issue first if you are unsure.
license
This module beginpm-license
, and all code and documentation,
is published under the Very Open License