Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

beginpm-license

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beginpm-license

Add a license file to your module.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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',
	// If the license requires a name and date,
	// these properties are required.
	date: '2017',
	holder: 'Tobias Davis',
	// Optional field
	filename: 'LICENSE.txt'
}
license({ cwd }, options)
	.then(() => {
		// The file is written
		// /path/to/module/LICENSE.txt
	})

options

license (string, required)

The identifier of the license. Supported licenses are:

  • MIT
  • VOL

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

Keywords

FAQs

Package last updated on 10 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc