license-o-matic
v1.2.0
Published
Generate SPDX license with ease
Downloads
43
Maintainers
Readme
license-o-matic
Generate common SPDX license with ease
Table of Contents
Install
This project uses node and npm.
$ npm install license-o-matic
$ # OR
$ yarn add license-o-matic
Usage
const licenseOMatic = require('license-o-matic')
console.log(licenseOMatic.getIdentifiers())
// [ 'mit',
// 'apache-2.0',
// 'gpl-3.0-only',
// 'mpl-2.0',
// 'unlicense',
// 'lgpl-3.0-only' ]
const mit = licenseOMatic.getLicense('mit')
console.log(mit({copyrightHolder: 'Tiaan du Plessis'}))
// MIT License
// Copyright (c) 2018 Tiaan du Plessis
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGESOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
CLI
$ npm -g install license-o-matic
$ # OR
$ yarn global add license-o-matic
$ # After install
$ license-o-matic ls
$ #
$ # - mit
$ # - apache-2.0
$ # - gpl-3.0-only
$ # - mpl-2.0
$ # - unlicense
$ # - lgpl-3.0-only
$ #
$ license-o-matic --license=mit --copyrightHolder="Tiaan du Plessis"
$ # License created
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature' 3.Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT