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

generator-license

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-license

Generate LICENSE file for your project using Yeoman.

  • 5.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
increased by91.88%
Maintainers
0
Weekly downloads
 
Created
Source

generator-license

build GitHub package.json version Coverage Status NPM version

Generate LICENSE file for your project using Yeoman.

yo license

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Install the generator: npm install -g generator-license
  • Run: yo license, enter your full name and choose a license

The generator will generate the LICENSE file and fill the license field of the package.json.

Compose with generator license in your own generator

generator-license can be easily embedded into your own generator using Yeoman composability.

First, install generator-license as a dependency of your own generator.

npm install --save generator-license

Then call it from your generator.

this.composeWith(require.resolve('generator-license'), {
  name: 'John Doe', // (optional) Owner's name
  email: 'john.doe@example.com', // (optional) Owner's email
  website: 'https://example.com', // (optional) Owner's website
  year: '1945', // (optional) License year (defaults to current year)
  licensePrompt: 'Which license do you want to use?', // (optional) customize license prompt text
  defaultLicense: 'MIT', // (optional) Select a default license
  license: 'MIT', // (optional) Select a license, so no license prompt will happen, in case you want to handle it outside of this generator
});

All the options are optional; the generator will prompt for answers when information is not provided.

Supported licenses

For Creative Commons Licenses (useful for media files, documentation and other creative works) you can use generator-license-cc.

License

MIT License

Keywords

FAQs

Package last updated on 24 Jun 2024

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