├── .editorconfig ├── .eslintrc.json ├── .gitattributes ├── .gitignore ├── .travis.yml ├── .verb.md ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docs └── demo.gif ├── generator.js ├── gulpfile.js ├── index.js ├── lib ├── choose.js └── utils.js ├── package.json ├── tasks ├── choices.js ├── file.js ├── index.js └── support │ ├── choices.tmpl │ └── tasks.tmpl ├── templates ├── afl-3.0.tmpl ├── agpl-3.0.tmpl ├── apache-2.0.tmpl ├── artistic-2.0.tmpl ├── bsd-2-clause.tmpl ├── bsd-3-clause-clear.tmpl ├── bsd-3-clause.tmpl ├── cc-by-4.0.tmpl ├── cc-by-sa-4.0.tmpl ├── cc0-1.0.tmpl ├── epl-1.0.tmpl ├── eupl-1.1.tmpl ├── gpl-2.0.tmpl ├── gpl-3.0.tmpl ├── isc.tmpl ├── lgpl-2.1.tmpl ├── lgpl-3.0.tmpl ├── lppl-1.3c.tmpl ├── mit.tmpl ├── mpl-2.0.tmpl ├── ms-pl.tmpl ├── ms-rl.tmpl ├── ofl-1.1.tmpl ├── osl-3.0.tmpl ├── unlicense.tmpl ├── wtfpl.tmpl └── zlib.tmpl └── test.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org/ 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [{**/{actual,fixtures,expected,templates}/**,*.md}] 13 | trim_trailing_whitespace = false 14 | insert_final_newline = false 15 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "es6": true, 5 | "node": true, 6 | "mocha": true 7 | }, 8 | 9 | "globals": { 10 | "document": false, 11 | "navigator": false, 12 | "window": false 13 | }, 14 | 15 | "rules": { 16 | "accessor-pairs": 2, 17 | "arrow-spacing": [2, { "before": true, "after": true }], 18 | "block-spacing": [2, "always"], 19 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 20 | "comma-dangle": [2, "never"], 21 | "comma-spacing": [2, { "before": false, "after": true }], 22 | "comma-style": [2, "last"], 23 | "constructor-super": 2, 24 | "curly": [2, "multi-line"], 25 | "dot-location": [2, "property"], 26 | "eol-last": 2, 27 | "eqeqeq": [2, "allow-null"], 28 | "generator-star-spacing": [2, { "before": true, "after": true }], 29 | "handle-callback-err": [2, "^(err|error)$" ], 30 | "indent": [2, 2, { "SwitchCase": 1 }], 31 | "key-spacing": [2, { "beforeColon": false, "afterColon": true }], 32 | "keyword-spacing": [2, { "before": true, "after": true }], 33 | "new-cap": [2, { "newIsCap": true, "capIsNew": false }], 34 | "new-parens": 2, 35 | "no-array-constructor": 2, 36 | "no-caller": 2, 37 | "no-class-assign": 2, 38 | "no-cond-assign": 2, 39 | "no-const-assign": 2, 40 | "no-control-regex": 2, 41 | "no-debugger": 2, 42 | "no-delete-var": 2, 43 | "no-dupe-args": 2, 44 | "no-dupe-class-members": 2, 45 | "no-dupe-keys": 2, 46 | "no-duplicate-case": 2, 47 | "no-empty-character-class": 2, 48 | "no-eval": 2, 49 | "no-ex-assign": 2, 50 | "no-extend-native": 2, 51 | "no-extra-bind": 2, 52 | "no-extra-boolean-cast": 2, 53 | "no-extra-parens": [2, "functions"], 54 | "no-fallthrough": 2, 55 | "no-floating-decimal": 2, 56 | "no-func-assign": 2, 57 | "no-implied-eval": 2, 58 | "no-inner-declarations": [2, "functions"], 59 | "no-invalid-regexp": 2, 60 | "no-irregular-whitespace": 2, 61 | "no-iterator": 2, 62 | "no-label-var": 2, 63 | "no-labels": 2, 64 | "no-lone-blocks": 2, 65 | "no-mixed-spaces-and-tabs": 2, 66 | "no-multi-spaces": 2, 67 | "no-multi-str": 2, 68 | "no-multiple-empty-lines": [2, { "max": 1 }], 69 | "no-native-reassign": 0, 70 | "no-negated-in-lhs": 2, 71 | "no-new": 2, 72 | "no-new-func": 2, 73 | "no-new-object": 2, 74 | "no-new-require": 2, 75 | "no-new-wrappers": 2, 76 | "no-obj-calls": 2, 77 | "no-octal": 2, 78 | "no-octal-escape": 2, 79 | "no-proto": 0, 80 | "no-redeclare": 2, 81 | "no-regex-spaces": 2, 82 | "no-return-assign": 2, 83 | "no-self-compare": 2, 84 | "no-sequences": 2, 85 | "no-shadow-restricted-names": 2, 86 | "no-spaced-func": 2, 87 | "no-sparse-arrays": 2, 88 | "no-this-before-super": 2, 89 | "no-throw-literal": 2, 90 | "no-trailing-spaces": 0, 91 | "no-undef": 2, 92 | "no-undef-init": 2, 93 | "no-unexpected-multiline": 2, 94 | "no-unneeded-ternary": [2, { "defaultAssignment": false }], 95 | "no-unreachable": 2, 96 | "no-unused-vars": [2, { "vars": "all", "args": "none" }], 97 | "no-useless-call": 0, 98 | "no-with": 2, 99 | "one-var": [0, { "initialized": "never" }], 100 | "operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }], 101 | "padded-blocks": [0, "never"], 102 | "quotes": [2, "single", "avoid-escape"], 103 | "radix": 2, 104 | "semi": [2, "always"], 105 | "semi-spacing": [2, { "before": false, "after": true }], 106 | "space-before-blocks": [2, "always"], 107 | "space-before-function-paren": [2, "never"], 108 | "space-in-parens": [2, "never"], 109 | "space-infix-ops": 2, 110 | "space-unary-ops": [2, { "words": true, "nonwords": false }], 111 | "spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], 112 | "use-isnan": 2, 113 | "valid-typeof": 2, 114 | "wrap-iife": [2, "any"], 115 | "yoda": [2, "never"] 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Enforce Unix newlines 2 | * text eol=lf 3 | 4 | # binaries 5 | *.ai binary 6 | *.psd binary 7 | *.jpg binary 8 | *.gif binary 9 | *.png binary 10 | *.jpeg binary 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # always ignore files 2 | *.DS_Store 3 | .idea 4 | *.sublime-* 5 | 6 | # test related, or directories generated by tests 7 | test/actual 8 | actual 9 | coverage 10 | .nyc* 11 | 12 | # npm 13 | node_modules 14 | npm-debug.log 15 | 16 | # yarn 17 | yarn.lock 18 | yarn-error.log 19 | 20 | # misc 21 | _gh_pages 22 | _draft 23 | _drafts 24 | bower_components 25 | vendor 26 | temp 27 | tmp 28 | TODO.md 29 | package-lock.json -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | os: 3 | - linux 4 | - osx 5 | language: node_js 6 | node_js: 7 | - node 8 | - '8' 9 | - '7' 10 | - '6' 11 | - '5' 12 | - '4' 13 | - '0.12' 14 | - '0.10' 15 | -------------------------------------------------------------------------------- /.verb.md: -------------------------------------------------------------------------------- 1 | ## Install 2 | 3 | To run this generator from the command line you must install both [generate][] and `{%= name %}`: 4 | 5 | ```sh 6 | # install generate and {%= name %} 7 | $ npm install --global generate {%= name %} 8 | # install only {%= name %} 9 | $ npm install --global {%= name %} 10 | ``` 11 | 12 | ## Generate a license 13 | 14 | Use [generate's CLI][generate] to write a license file to the current working directory: 15 | 16 | ```sh 17 | # prompts you to choose a license to generate 18 | $ gen license 19 | ``` 20 | 21 | The file is automatically named according to preferences defined at GitHub's [choosealicense.com][choose] repository (usually it's `LICENSE`, but not always. See the license files in that repository for more details). 22 | 23 | **Specify the license to generate** 24 | 25 | If you don't want to be prompted, you can specify the license up front: 26 | 27 | ```sh 28 | $ gen license: 29 | # example 30 | $ gen license:mit 31 | ``` 32 | 33 | **Specify output directory** 34 | 35 | ```sh 36 | # write a license file to "some-folder/LICENSE" 37 | $ gen license -d some-folder 38 | ``` 39 | 40 | [choose]: https://github.com/github/choosealicense.com 41 | 42 | ## API 43 | 44 | Visit [generate's documenatation][generate] to learn how to use this generator as a plugin or sub-generator. -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Release history 2 | 3 | This project follows [keep-a-changelog][] conventions for tracking release history. 4 | 5 | ### key 6 | 7 | Changelog entries are categorized using the following labels: 8 | 9 | - `added`: for new features 10 | - `changed`: for changes in existing functionality 11 | - `deprecated`: for once-stable features removed in upcoming releases 12 | - `removed`: for deprecated features removed in this release 13 | - `fixed`: for any bug fixes 14 | 15 | ### [0.5.0] 16 | 17 | **Added** 18 | 19 | - Adds support for all `LICENSE` templates from 20 | 21 | 22 | [0.5.0]: https://github.com/generate/generate/compare/0.4.0...0.5.0 23 | 24 | [keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2017, Jon Schlinkert. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | 6 |

7 | 8 | Generate a license file. Choose any of the licenses supported by https://github.com/github/choosealicense.com. 9 | 10 | # generate-license 11 | 12 | [![NPM version](https://img.shields.io/npm/v/generate-license.svg?style=flat)](https://www.npmjs.com/package/generate-license) [![NPM monthly downloads](https://img.shields.io/npm/dm/generate-license.svg?style=flat)](https://npmjs.org/package/generate-license) [![Build Status](https://img.shields.io/travis/generate/generate-license.svg?style=flat)](https://travis-ci.org/generate/generate-license) 13 | 14 | ![generate-license demo](https://raw.githubusercontent.com/generate/generate-license/master/docs/demo.gif) 15 | 16 | - [Install](#install) 17 | - [Generate a license](#generate-a-license) 18 | - [API](#api) 19 | - [Getting started](#getting-started) 20 | * [Install](#install-1) 21 | * [CLI](#cli) 22 | * [Help](#help) 23 | - [Tasks](#tasks) 24 | - [Next Steps](#next-steps) 25 | - [About](#about) 26 | * [What is "Generate"?](#what-is-generate) 27 | * [Related projects](#related-projects) 28 | * [Community](#community) 29 | * [Contributors](#contributors) 30 | * [Contributing](#contributing) 31 | * [Running tests](#running-tests) 32 | * [Release history](#release-history) 33 | * [Author](#author) 34 | * [License](#license) 35 | 36 | _(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ 37 | 38 | ## Install 39 | 40 | To run this generator from the command line you must install both [generate](https://github.com/generate/generate) and `generate-license`: 41 | 42 | ```sh 43 | # install generate and generate-license 44 | $ npm install --global generate generate-license 45 | # install only generate-license 46 | $ npm install --global generate-license 47 | ``` 48 | 49 | ## Generate a license 50 | 51 | Use [generate's CLI](https://github.com/generate/generate) to write a license file to the current working directory: 52 | 53 | ```sh 54 | # prompts you to choose a license to generate 55 | $ gen license 56 | ``` 57 | 58 | The file is automatically named according to preferences defined at GitHub's [choosealicense.com](https://github.com/github/choosealicense.com) repository (usually it's `LICENSE`, but not always. See the license files in that repository for more details). 59 | 60 | **Specify the license to generate** 61 | 62 | If you don't want to be prompted, you can specify the license up front: 63 | 64 | ```sh 65 | $ gen license: 66 | # example 67 | $ gen license:mit 68 | ``` 69 | 70 | **Specify output directory** 71 | 72 | ```sh 73 | # write a license file to "some-folder/LICENSE" 74 | $ gen license -d some-folder 75 | ``` 76 | 77 | ## API 78 | 79 | Visit [generate's documenatation](https://github.com/generate/generate) to learn how to use this generator as a plugin or sub-generator. 80 | 81 | ## Getting started 82 | 83 | ### Install 84 | 85 | **Installing the CLI** 86 | 87 | To run the `readme` generator from the command line, you'll need to install [Generate](https://github.com/generate/generate) globally first. You can do that now with the following command: 88 | 89 | ```sh 90 | $ npm install --global generate 91 | ``` 92 | 93 | This adds the `gen` command to your system path, allowing it to be run from any directory. 94 | 95 | **Install generate-license** 96 | 97 | Install this module with the following command: 98 | 99 | ```sh 100 | $ npm install --global generate-license 101 | ``` 102 | 103 | ### CLI 104 | 105 | Run this generator's `default` [task](https://github.com/generate/generate/blob/master/docs/tasks.md#default) with the following command: 106 | 107 | ```sh 108 | $ gen readme 109 | ``` 110 | 111 | **What you should see in the terminal** 112 | 113 | If completed successfully, you should see both `starting` and `finished` events in the terminal, like the following: 114 | 115 | ```sh 116 | [00:44:21] starting ... 117 | ... 118 | [00:44:22] finished ✔ 119 | ``` 120 | 121 | If you do not see one or both of those events, please [let us know about it](../../issues). 122 | 123 | ### Help 124 | 125 | To see a general help menu and available commands for Generate's CLI, run: 126 | 127 | ```sh 128 | $ gen help 129 | ``` 130 | 131 | ## Available tasks 132 | 133 | All available tasks for this generator. 134 | 135 | ### [default](generator.js#L34) 136 | 137 | The `default` task prompts you to choose the `LICENSE` to generate. All licenses from [github/choosealicense.com](https://github.com/github/choosealicense.com) are available. 138 | 139 | **Example** 140 | 141 | ```sh 142 | $ gen license 143 | $ gen license --dest ./docs 144 | # or 145 | $ gen license:choose 146 | $ gen license:choose --dest ./docs 147 | ``` 148 | 149 | Visit Generate's [documentation for tasks](https://github.com/generate/generate/blob/master/docs/tasks.md). 150 | 151 | ## Next steps 152 | 153 | ### Running unit tests 154 | 155 | It's never too early to begin running unit tests. When you're ready to get started, the following command will ensure the project's dependencies are installed then run all of the unit tests: 156 | 157 | ```sh 158 | $ npm install && test 159 | ``` 160 | 161 | ### Publishing your generator 162 | 163 | If you're tests are passing and you're ready to publish your generator to [npm](https://www.npmjs.com), you can do that now with the following command: 164 | 165 | **Are you sure you're ready?!** 166 | 167 | Let's go! 168 | 169 | ```sh 170 | $ npm publish 171 | ``` 172 | 173 | ## About 174 | 175 | ### What is "Generate"? 176 | 177 | Generate is a command line tool and developer framework for scaffolding out new GitHub projects using [generators](https://github.com/generate/generate/blob/master/docs/generators.md) and [tasks](https://github.com/generate/generate/blob/master/docs/tasks.md). 178 | 179 | Answers to prompts and the user's environment can be used to determine the templates, directories, files and contents to build. Support for [gulp](http://gulpjs.com), [base](https://github.com/node-base/base) and [assemble](https://github.com/assemble/assemble) plugins, and much more. 180 | 181 | **For more information**: 182 | 183 | * Visit the [generate project](https://github.com/generate/generate/) 184 | * Visit the [generate documentation](https://github.com/generate/generate/blob/master/docs/) 185 | * Find [generators on npm](https://www.npmjs.com/browse/keyword/generate-generator) (help us [author generators](https://github.com/generate/generate/blob/master/docs/micro-generators.md)) 186 | 187 | ### Related projects 188 | 189 | * [generate-eslint](https://www.npmjs.com/package/generate-eslint): Generate a new `.eslintrc.json` or `.eslintignore` file from a pre-defined or user-defined template. Can be… [more](https://github.com/generate/generate-eslint) | [homepage](https://github.com/generate/generate-eslint "Generate a new `.eslintrc.json` or `.eslintignore` file from a pre-defined or user-defined template. Can be used from the command line when installed globally, or as a plugin in your own generator.") 190 | * [generate-install](https://www.npmjs.com/package/generate-install): Generator that automatically detects the dependencies or devDependencies to install based on the templates or… [more](https://github.com/generate/generate-install) | [homepage](https://github.com/generate/generate-install "Generator that automatically detects the dependencies or devDependencies to install based on the templates or includes that are dynamically used by your generator. This can be used as a sub-generator or plugin in your own generator.") 191 | * [generate-package](https://www.npmjs.com/package/generate-package): Generate a package.json from a pre-defined or user-defined template. This generator can be used from… [more](https://github.com/generate/generate-package) | [homepage](https://github.com/generate/generate-package "Generate a package.json from a pre-defined or user-defined template. This generator can be used from the command line when globally installed, or as a plugin or sub-generator in your own generator.") 192 | 193 | ### Community 194 | 195 | Bigger community means more plugins, better support and more progress. Help us make Generate better by spreading the word: 196 | 197 | * Show your love by starring the project 198 | * Tweet about Generate. Mention using `@generatejs`, or use the `#generatejs` hashtag 199 | * Get implementation help on [StackOverflow](http://stackoverflow.com/questions/tagged/generate) with the `generatejs` tag 200 | * Discuss Generate with us on [Gitter](https://gitter.im/generate/generate) 201 | * If you publish a generator, to make your project as discoverable as possible, please add the unique keyword `generategenerator` to your project's package.json. 202 | 203 | ### Contributors 204 | 205 | | **Commits** | **Contributor** | 206 | | --- | --- | 207 | | 78 | [jonschlinkert](https://github.com/jonschlinkert) | 208 | | 10 | [pointnet](https://github.com/pointnet) | 209 | | 4 | [doowb](https://github.com/doowb) | 210 | 211 | ### Contributing 212 | 213 | Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). 214 | 215 | ### Running tests 216 | 217 | Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: 218 | 219 | ```sh 220 | $ npm install && npm test 221 | ``` 222 | 223 | ### Author 224 | 225 | **Jon Schlinkert** 226 | 227 | * [github/jonschlinkert](https://github.com/jonschlinkert) 228 | * [twitter/jonschlinkert](https://twitter.com/jonschlinkert) 229 | 230 | ### License 231 | 232 | Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). 233 | Released under the [MIT License](LICENSE). 234 | 235 | *** 236 | 237 | _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._ -------------------------------------------------------------------------------- /docs/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/generate/generate-license/189309b897c564480904126b7c0e62763a2b365b/docs/demo.gif -------------------------------------------------------------------------------- /generator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var isValid = require('is-valid-app'); 4 | var choices = require('./tasks/choices'); 5 | var choose = require('./lib/choose'); 6 | var tasks = require('./tasks'); 7 | 8 | module.exports = function(app) { 9 | if (!isValid(app, 'generate-license')) return; 10 | 11 | /** 12 | * Plugins 13 | */ 14 | 15 | app.use(require('generate-defaults')); 16 | app.use(require('./tasks')); 17 | 18 | /** 19 | * The `default` task prompts you to choose the `LICENSE` to generate. All licenses 20 | * from [github/choosealicense.com](https://github.com/github/choosealicense.com) are 21 | * available. 22 | * 23 | * ```sh 24 | * $ gen license 25 | * $ gen license --dest ./docs 26 | * # or 27 | * $ gen license:choose 28 | * $ gen license:choose --dest ./docs 29 | * ``` 30 | * @name default 31 | * @api public 32 | */ 33 | 34 | app.task('default', ['license']); 35 | app.task('license', function(cb) { 36 | app.build(app.options.defaultLicense || ['choose'], cb); 37 | }); 38 | 39 | /** 40 | * Prompt the user to choose the license to generate. 41 | */ 42 | 43 | app.task('license-choose', ['choose']); 44 | app.task('license-prompt', ['choose']); 45 | app.task('choose', function(cb) { 46 | var options = { 47 | message: 'Which license would you like to generate?', 48 | choices: choices, 49 | filter: function(str, choice) { 50 | var re = new RegExp(str, 'i'); 51 | return re.test(choice.name[0]) || re.test(choice.id); 52 | } 53 | }; 54 | 55 | choose(app, options) 56 | .then(function(name) { 57 | app.build(name, cb); 58 | }) 59 | .catch(cb); 60 | }); 61 | 62 | /** 63 | * Generate `tasks.js` file 64 | */ 65 | 66 | app.task('create-tasks', function(cb) { 67 | return app.src('templates/*.tmpl') 68 | .pipe(tasks({template: 'tasks/support/tasks.tmpl'})) 69 | .pipe(app.renderFile('*')) 70 | .pipe(app.dest(app.cwd)); 71 | }); 72 | 73 | /** 74 | * Generate `choices.js` file 75 | */ 76 | 77 | app.task('create-choices', function(cb) { 78 | return app.src('templates/*.tmpl') 79 | .pipe(tasks({template: 'tasks/support/choices.tmpl'})) 80 | .pipe(app.renderFile('*')) 81 | .pipe(app.dest(app.cwd)); 82 | }); 83 | 84 | app.task('create', ['create-*']); 85 | }; 86 | 87 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var fs = require('fs'); 4 | var path = require('path'); 5 | var gulp = require('gulp'); 6 | var clone = require('gh-clone'); 7 | var through = require('through2'); 8 | var extend = require('extend-shallow'); 9 | var parser = require('parser-front-matter'); 10 | var File = require('vinyl'); 11 | var yaml = require('js-yaml'); 12 | var del = require('delete'); 13 | 14 | var cwd = path.join.bind(path, __dirname); 15 | var paths = { 16 | support: cwd.bind(cwd, 'support'), 17 | templates: cwd.bind(cwd, 'templates'), 18 | vendor: cwd.bind(cwd, 'vendor/choosealicense'), 19 | licenses: cwd.bind(cwd, 'vendor/choosealicense/_licenses') 20 | }; 21 | 22 | var yfm = {rename: {basename: 'LICENSE'}}; 23 | 24 | var replacements = { 25 | helpers: [], 26 | fields: { 27 | description: ['description', 'Project description?'], 28 | email: ['author.email', 'Author\'s primary email address?'], 29 | fullname: ['author.name', 'Author\'s full name?'], 30 | login: ['owner', 'Project owner (GitHub username or org)?'], 31 | project: ['name', 'Project name?'] 32 | }, 33 | basename: { 34 | 'unlicense': 'UNLICENSE', 35 | 'lgpl-3.0': 'LICENSE.lesser' 36 | }, 37 | deps: { 38 | 'lgpl-3.0': ['gpl-3.0', '\nThis will also generate a GNU General Public License v3.0 `LICENSE` * file in the current working directory.\n'] 39 | }, 40 | snippets: { 41 | 'MIT License': 'The MIT License (MIT)' 42 | } 43 | }; 44 | 45 | gulp.task('del', function() { 46 | return del(['vendor/*', 'templates']); 47 | }); 48 | 49 | gulp.task('convert', function(cb) { 50 | gulp.src('*.txt', {cwd: paths.licenses()}) 51 | .pipe(through.obj(function(file, enc, next) { 52 | file = new File(file); 53 | parser.parse(file, function(err, res) { 54 | if (err) return next(err); 55 | next(null, convert(res, replacements)); 56 | }); 57 | })) 58 | .pipe(gulp.dest(function(file) { 59 | file.extname = '.tmpl'; 60 | return 'templates'; 61 | })); 62 | }); 63 | 64 | gulp.task('data', function(cb) { 65 | replacements.helpers = buildData(replacements); 66 | cb(); 67 | }); 68 | 69 | gulp.task('clone', ['del'], function(cb) { 70 | clone({repo: 'github/choosealicense.com', dest: paths.vendor()}, function(err) { 71 | if (err) return cb(err); 72 | gulp.start(['data', 'convert'], cb); 73 | }); 74 | }); 75 | 76 | gulp.task('default', ['clone']); 77 | 78 | function convert(parsed, replacements) { 79 | var file = new File({path: parsed.path, base: paths.licenses()}); 80 | var str = parsed.content; 81 | var obj = extend({}, yfm); 82 | var data = extend({deps: []}, obj, parsed.data); 83 | 84 | // if the license depends on other licenses, add those to `names` 85 | var deps = replacements.deps[file.stem]; 86 | if (deps) { 87 | data.deps.push(deps[0]); 88 | data.extra = deps[1] || ''; 89 | } 90 | 91 | var basename = data.rename.basename; 92 | if (replacements.basename.hasOwnProperty(file.stem)) { 93 | basename = replacements.basename[file.stem]; 94 | } 95 | 96 | var rename = { basename: basename }; 97 | data.rename = rename; 98 | file.data = data; 99 | 100 | var prefix = '---\n' + yaml.dump(data) + '---\n'; 101 | 102 | // '[LICENSE]': 'author.name' 103 | str = str.replace(/\t/g, ' '); 104 | replacements.helpers.forEach(function(obj) { 105 | str = str.split(obj.name).join(obj.tmpl); 106 | }); 107 | 108 | for (var key in replacements.snippets) { 109 | if (replacements.snippets.hasOwnProperty(key)) { 110 | // replace only the first occurrence 111 | str = str.replace(key, replacements.snippets[key]); 112 | } 113 | } 114 | 115 | file.contents = new Buffer(prefix + str); 116 | return file; 117 | } 118 | 119 | function buildData(replacements) { 120 | var fields = yaml.safeLoad(fs.readFileSync(paths.vendor('_data/fields.yml'))); 121 | var arr = []; 122 | fields.forEach(function(item) { 123 | var field = extend({}, item); 124 | var obj = {}; 125 | obj.name = `[${field.name}]`; 126 | var name = field.name; 127 | var desc = field.description; 128 | 129 | var newField = replacements.fields[field.name]; 130 | if (newField) { 131 | name = newField[0] || ''; 132 | desc = newField[1] || desc || ''; 133 | } 134 | 135 | name = name.split('"').join('\\"'); 136 | desc = desc.split('"').join('\\"'); 137 | 138 | if (field.name === 'year') { 139 | obj.tmpl = '<%= year %>'; 140 | } else { 141 | obj.tmpl = `<%= ask("${name}", "${desc}") %>`; 142 | } 143 | arr.push(obj); 144 | }); 145 | return arr; 146 | } 147 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./generator'); 4 | -------------------------------------------------------------------------------- /lib/choose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var extend = require('extend-shallow'); 4 | 5 | module.exports = function(app, options) { 6 | var opts = extend({}, options); 7 | var AutoComplete = require('prompt-autocompletion'); 8 | 9 | var autocomplete = new AutoComplete({ 10 | name: 'tasks', 11 | type: 'autocomplete', 12 | message: opts.message, 13 | source: listTasks(opts) 14 | }); 15 | 16 | return autocomplete.run() 17 | .then(function(answer) { 18 | return answer; 19 | }); 20 | }; 21 | 22 | function listTasks(options) { 23 | return function(answers, str) { 24 | return new Promise(function(resolve) { 25 | resolve(options.choices.filter(filter(str, options))); 26 | }); 27 | }; 28 | } 29 | 30 | function filter(str, options) { 31 | return function(choice, choices) { 32 | if (typeof options.filter === 'function') { 33 | return options.filter(str, choice, choices); 34 | } 35 | return new RegExp(str, 'i').test(choice.name[0]); 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('lazy-cache')(require); 4 | var fn = require; 5 | require = utils; 6 | 7 | /** 8 | * Lazily required module dependencies 9 | */ 10 | 11 | require('is-valid-app', 'isValid'); 12 | require('through2', 'through'); 13 | require('vinyl', 'File'); 14 | require = fn; 15 | 16 | /** 17 | * Expose `utils` modules 18 | */ 19 | 20 | module.exports = utils; 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generate-license", 3 | "description": "Generate a license file. Choose any of the licenses supported by https://github.com/github/choosealicense.com.", 4 | "version": "1.0.0", 5 | "homepage": "https://github.com/generate/generate-license", 6 | "author": "Jon Schlinkert (https://github.com/jonschlinkert)", 7 | "contributors": [ 8 | "Brian Woodward (https://twitter.com/doowb)", 9 | "Jon Schlinkert (http://twitter.com/jonschlinkert)", 10 | "pointnet (https://github.com/pointnet)" 11 | ], 12 | "repository": "generate/generate-license", 13 | "bugs": { 14 | "url": "https://github.com/generate/generate-license/issues" 15 | }, 16 | "license": "MIT", 17 | "files": [ 18 | "generator.js", 19 | "index.js", 20 | "lib", 21 | "tasks", 22 | "templates" 23 | ], 24 | "main": "index.js", 25 | "engines": { 26 | "node": ">=0.10.0" 27 | }, 28 | "scripts": { 29 | "test": "mocha" 30 | }, 31 | "dependencies": { 32 | "extend-shallow": "^2.0.1", 33 | "generate-defaults": "^0.6.6", 34 | "is-valid-app": "^0.3.0", 35 | "prompt-autocompletion": "^0.1.1", 36 | "through2": "^2.0.3", 37 | "vinyl": "^2.1.0" 38 | }, 39 | "devDependencies": { 40 | "bdd-stdin": "^0.2.0", 41 | "delete": "^1.1.0", 42 | "generate": "^0.14.0", 43 | "gh-clone": "^1.0.0", 44 | "global-modules": "^1.0.0", 45 | "gulp": "^3.9.1", 46 | "gulp-format-md": "^1.0.0", 47 | "helper-changelog": "^0.3.0", 48 | "intercept-stdout": "^0.1.2", 49 | "js-yaml": "^3.10.0", 50 | "mocha": "^3.0.1", 51 | "npm-install-global": "^1.0.0", 52 | "parser-front-matter": "^1.6.4" 53 | }, 54 | "keywords": [ 55 | "AFL-3.0", 56 | "AGPL-3.0", 57 | "APACHE-2.0", 58 | "ARTISTIC-2.0", 59 | "boilerplate", 60 | "BSD-2-CLAUSE", 61 | "BSD-3-CLAUSE", 62 | "BSD-3-CLAUSE-CLEAR", 63 | "build", 64 | "CC-BY-4.0", 65 | "CC-BY-SA-4.0", 66 | "CC0-1.0", 67 | "choosealicense.com", 68 | "cli", 69 | "cli-app", 70 | "command-line", 71 | "create", 72 | "dev", 73 | "development", 74 | "EPL-1.0", 75 | "EUPL-1.1", 76 | "file", 77 | "framework", 78 | "front", 79 | "frontend", 80 | "generate", 81 | "generate-generator", 82 | "generate-plugin", 83 | "generategenerator", 84 | "generateplugin", 85 | "generator", 86 | "github", 87 | "GPL-2.0", 88 | "GPL-3.0", 89 | "init", 90 | "initialize", 91 | "ISC", 92 | "LGPL-2.1", 93 | "LGPL-3.0", 94 | "license", 95 | "LPPL-1.3C", 96 | "mit", 97 | "MIT", 98 | "MPL-2.0", 99 | "MS-PL", 100 | "MS-RL", 101 | "new", 102 | "OFL-1.1", 103 | "OSL-3.0", 104 | "plugin", 105 | "project", 106 | "projects", 107 | "scaffold", 108 | "scaffolder", 109 | "scaffolding", 110 | "template", 111 | "templates", 112 | "UNLICENSE", 113 | "webapp", 114 | "WTFPL", 115 | "yeoman", 116 | "yo", 117 | "ZLIB" 118 | ], 119 | "verb": { 120 | "toc": true, 121 | "layout": "generator", 122 | "tasks": [ 123 | "readme" 124 | ], 125 | "helpers": [ 126 | "helper-changelog" 127 | ], 128 | "plugins": [ 129 | "gulp-format-md" 130 | ], 131 | "related": { 132 | "list": [ 133 | "generate-eslint", 134 | "generate-install", 135 | "generate-package" 136 | ] 137 | }, 138 | "reflinks": [ 139 | "assemble", 140 | "base", 141 | "generate", 142 | "generate-dest", 143 | "gulp", 144 | "verb", 145 | "verb-readme-generator" 146 | ], 147 | "lint": { 148 | "reflinks": true 149 | } 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /tasks/choices.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = [ 4 | { name: ['Academic Free License v3.0'], id: 'afl-3.0', value: 'license-afl-3.0' }, 5 | { name: ['Apache License 2.0'], id: 'apache-2.0', value: 'license-apache-2.0' }, 6 | { name: ['Artistic License 2.0'], id: 'artistic-2.0', value: 'license-artistic-2.0' }, 7 | { name: ['BSD 2-clause "Simplified" License'], id: 'bsd-2-clause', value: 'license-bsd-2-clause' }, 8 | { name: ['BSD 3-clause "New" or "Revised" License'], id: 'bsd-3-clause', value: 'license-bsd-3-clause' }, 9 | { name: ['BSD 3-clause Clear License'], id: 'bsd-3-clause-clear', value: 'license-bsd-3-clause-clear' }, 10 | { name: ['Creative Commons Attribution 4.0'], id: 'cc-by-4.0', value: 'license-cc-by-4.0' }, 11 | { name: ['Creative Commons Attribution Share Alike 4.0'], id: 'cc-by-sa-4.0', value: 'license-cc-by-sa-4.0' }, 12 | { name: ['Creative Commons Zero v1.0 Universal'], id: 'cc0-1.0', value: 'license-cc0-1.0' }, 13 | { name: ['Do What The F*ck You Want To Public License'], id: 'wtfpl', value: 'license-wtfpl' }, 14 | { name: ['Eclipse Public License 1.0'], id: 'epl-1.0', value: 'license-epl-1.0' }, 15 | { name: ['European Union Public License 1.1'], id: 'eupl-1.1', value: 'license-eupl-1.1' }, 16 | { name: ['GNU Affero General Public License v3.0'], id: 'agpl-3.0', value: 'license-agpl-3.0' }, 17 | { name: ['GNU General Public License v2.0'], id: 'gpl-2.0', value: 'license-gpl-2.0' }, 18 | { name: ['GNU General Public License v3.0'], id: 'gpl-3.0', value: 'license-gpl-3.0' }, 19 | { name: ['GNU Lesser General Public License v2.1'], id: 'lgpl-2.1', value: 'license-lgpl-2.1' }, 20 | { name: ['GNU Lesser General Public License v3.0'], id: 'lgpl-3.0', value: 'license-lgpl-3.0' }, 21 | { name: ['ISC License'], id: 'isc', value: 'license-isc' }, 22 | { name: ['LaTeX Project Public License v1.3c'], id: 'lppl-1.3c', value: 'license-lppl-1.3c' }, 23 | { name: ['MIT License'], id: 'mit', value: 'license-mit' }, 24 | { name: ['Microsoft Public License'], id: 'ms-pl', value: 'license-ms-pl' }, 25 | { name: ['Microsoft Reciprocal License'], id: 'ms-rl', value: 'license-ms-rl' }, 26 | { name: ['Mozilla Public License 2.0'], id: 'mpl-2.0', value: 'license-mpl-2.0' }, 27 | { name: ['Open Software License 3.0'], id: 'osl-3.0', value: 'license-osl-3.0' }, 28 | { name: ['SIL Open Font License 1.1'], id: 'ofl-1.1', value: 'license-ofl-1.1' }, 29 | { name: ['The Unlicense'], id: 'unlicense', value: 'license-unlicense' }, 30 | { name: ['zlib License'], id: 'zlib', value: 'license-zlib' }, 31 | ]; 32 | -------------------------------------------------------------------------------- /tasks/file.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Generate a single file 5 | */ 6 | 7 | module.exports = function file(app, name) { 8 | return app.src(name, { cwd: __dirname }) 9 | .pipe(app.renderFile('*', {layout: null})).on('error', console.log) 10 | .pipe(app.conflicts(app.cwd)) 11 | .pipe(app.dest(app.cwd)); 12 | }; 13 | -------------------------------------------------------------------------------- /tasks/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var file = require('./file'); 4 | 5 | module.exports = function(app) { 6 | 7 | /** 8 | * Generate a(n) `afl-3.0` license file to the current working directory. 9 | * 10 | * ```sh 11 | * $ gen license:afl-3.0 12 | * $ gen license:afl-3.0 --dest ./foo 13 | * ``` 14 | * @name afl-3.0 15 | * @api public 16 | */ 17 | 18 | app.task('afl-3.0', ['license-afl-3.0']); 19 | app.task('license-afl-3.0', { silent: true }, function() { 20 | return file(app, '../templates/afl-3.0.tmpl'); 21 | }); 22 | 23 | /** 24 | * Generate a(n) `apache-2.0` license file to the current working directory. 25 | * 26 | * ```sh 27 | * $ gen license:apache-2.0 28 | * $ gen license:apache-2.0 --dest ./foo 29 | * ``` 30 | * @name apache-2.0 31 | * @api public 32 | */ 33 | 34 | app.task('apache-2.0', ['license-apache-2.0']); 35 | app.task('license-apache-2.0', { silent: true }, function() { 36 | return file(app, '../templates/apache-2.0.tmpl'); 37 | }); 38 | 39 | /** 40 | * Generate a(n) `artistic-2.0` license file to the current working directory. 41 | * 42 | * ```sh 43 | * $ gen license:artistic-2.0 44 | * $ gen license:artistic-2.0 --dest ./foo 45 | * ``` 46 | * @name artistic-2.0 47 | * @api public 48 | */ 49 | 50 | app.task('artistic-2.0', ['license-artistic-2.0']); 51 | app.task('license-artistic-2.0', { silent: true }, function() { 52 | return file(app, '../templates/artistic-2.0.tmpl'); 53 | }); 54 | 55 | /** 56 | * Generate a(n) `bsd-2-clause` license file to the current working directory. 57 | * 58 | * ```sh 59 | * $ gen license:bsd-2-clause 60 | * $ gen license:bsd-2-clause --dest ./foo 61 | * ``` 62 | * @name bsd-2-clause 63 | * @api public 64 | */ 65 | 66 | app.task('bsd-2-clause', ['license-bsd-2-clause']); 67 | app.task('license-bsd-2-clause', { silent: true }, function() { 68 | return file(app, '../templates/bsd-2-clause.tmpl'); 69 | }); 70 | 71 | /** 72 | * Generate a(n) `bsd-3-clause` license file to the current working directory. 73 | * 74 | * ```sh 75 | * $ gen license:bsd-3-clause 76 | * $ gen license:bsd-3-clause --dest ./foo 77 | * ``` 78 | * @name bsd-3-clause 79 | * @api public 80 | */ 81 | 82 | app.task('bsd-3-clause', ['license-bsd-3-clause']); 83 | app.task('license-bsd-3-clause', { silent: true }, function() { 84 | return file(app, '../templates/bsd-3-clause.tmpl'); 85 | }); 86 | 87 | /** 88 | * Generate a(n) `bsd-3-clause-clear` license file to the current working directory. 89 | * 90 | * ```sh 91 | * $ gen license:bsd-3-clause-clear 92 | * $ gen license:bsd-3-clause-clear --dest ./foo 93 | * ``` 94 | * @name bsd-3-clause-clear 95 | * @api public 96 | */ 97 | 98 | app.task('bsd-3-clause-clear', ['license-bsd-3-clause-clear']); 99 | app.task('license-bsd-3-clause-clear', { silent: true }, function() { 100 | return file(app, '../templates/bsd-3-clause-clear.tmpl'); 101 | }); 102 | 103 | /** 104 | * Generate a(n) `cc-by-4.0` license file to the current working directory. 105 | * 106 | * ```sh 107 | * $ gen license:cc-by-4.0 108 | * $ gen license:cc-by-4.0 --dest ./foo 109 | * ``` 110 | * @name cc-by-4.0 111 | * @api public 112 | */ 113 | 114 | app.task('cc-by-4.0', ['license-cc-by-4.0']); 115 | app.task('license-cc-by-4.0', { silent: true }, function() { 116 | return file(app, '../templates/cc-by-4.0.tmpl'); 117 | }); 118 | 119 | /** 120 | * Generate a(n) `cc-by-sa-4.0` license file to the current working directory. 121 | * 122 | * ```sh 123 | * $ gen license:cc-by-sa-4.0 124 | * $ gen license:cc-by-sa-4.0 --dest ./foo 125 | * ``` 126 | * @name cc-by-sa-4.0 127 | * @api public 128 | */ 129 | 130 | app.task('cc-by-sa-4.0', ['license-cc-by-sa-4.0']); 131 | app.task('license-cc-by-sa-4.0', { silent: true }, function() { 132 | return file(app, '../templates/cc-by-sa-4.0.tmpl'); 133 | }); 134 | 135 | /** 136 | * Generate a(n) `cc0-1.0` license file to the current working directory. 137 | * 138 | * ```sh 139 | * $ gen license:cc0-1.0 140 | * $ gen license:cc0-1.0 --dest ./foo 141 | * ``` 142 | * @name cc0-1.0 143 | * @api public 144 | */ 145 | 146 | app.task('cc0-1.0', ['license-cc0-1.0']); 147 | app.task('license-cc0-1.0', { silent: true }, function() { 148 | return file(app, '../templates/cc0-1.0.tmpl'); 149 | }); 150 | 151 | /** 152 | * Generate a(n) `wtfpl` license file to the current working directory. 153 | * 154 | * ```sh 155 | * $ gen license:wtfpl 156 | * $ gen license:wtfpl --dest ./foo 157 | * ``` 158 | * @name wtfpl 159 | * @api public 160 | */ 161 | 162 | app.task('wtfpl', ['license-wtfpl']); 163 | app.task('license-wtfpl', { silent: true }, function() { 164 | return file(app, '../templates/wtfpl.tmpl'); 165 | }); 166 | 167 | /** 168 | * Generate a(n) `epl-1.0` license file to the current working directory. 169 | * 170 | * ```sh 171 | * $ gen license:epl-1.0 172 | * $ gen license:epl-1.0 --dest ./foo 173 | * ``` 174 | * @name epl-1.0 175 | * @api public 176 | */ 177 | 178 | app.task('epl-1.0', ['license-epl-1.0']); 179 | app.task('license-epl-1.0', { silent: true }, function() { 180 | return file(app, '../templates/epl-1.0.tmpl'); 181 | }); 182 | 183 | /** 184 | * Generate a(n) `eupl-1.1` license file to the current working directory. 185 | * 186 | * ```sh 187 | * $ gen license:eupl-1.1 188 | * $ gen license:eupl-1.1 --dest ./foo 189 | * ``` 190 | * @name eupl-1.1 191 | * @api public 192 | */ 193 | 194 | app.task('eupl-1.1', ['license-eupl-1.1']); 195 | app.task('license-eupl-1.1', { silent: true }, function() { 196 | return file(app, '../templates/eupl-1.1.tmpl'); 197 | }); 198 | 199 | /** 200 | * Generate a(n) `agpl-3.0` license file to the current working directory. 201 | * 202 | * ```sh 203 | * $ gen license:agpl-3.0 204 | * $ gen license:agpl-3.0 --dest ./foo 205 | * ``` 206 | * @name agpl-3.0 207 | * @api public 208 | */ 209 | 210 | app.task('agpl-3.0', ['license-agpl-3.0']); 211 | app.task('license-agpl-3.0', { silent: true }, function() { 212 | return file(app, '../templates/agpl-3.0.tmpl'); 213 | }); 214 | 215 | /** 216 | * Generate a(n) `gpl-2.0` license file to the current working directory. 217 | * 218 | * ```sh 219 | * $ gen license:gpl-2.0 220 | * $ gen license:gpl-2.0 --dest ./foo 221 | * ``` 222 | * @name gpl-2.0 223 | * @api public 224 | */ 225 | 226 | app.task('gpl-2.0', ['license-gpl-2.0']); 227 | app.task('license-gpl-2.0', { silent: true }, function() { 228 | return file(app, '../templates/gpl-2.0.tmpl'); 229 | }); 230 | 231 | /** 232 | * Generate a(n) `gpl-3.0` license file to the current working directory. 233 | * 234 | * ```sh 235 | * $ gen license:gpl-3.0 236 | * $ gen license:gpl-3.0 --dest ./foo 237 | * ``` 238 | * @name gpl-3.0 239 | * @api public 240 | */ 241 | 242 | app.task('gpl-3.0', ['license-gpl-3.0']); 243 | app.task('license-gpl-3.0', { silent: true }, function() { 244 | return file(app, '../templates/gpl-3.0.tmpl'); 245 | }); 246 | 247 | /** 248 | * Generate a(n) `lgpl-2.1` license file to the current working directory. 249 | * 250 | * ```sh 251 | * $ gen license:lgpl-2.1 252 | * $ gen license:lgpl-2.1 --dest ./foo 253 | * ``` 254 | * @name lgpl-2.1 255 | * @api public 256 | */ 257 | 258 | app.task('lgpl-2.1', ['license-lgpl-2.1']); 259 | app.task('license-lgpl-2.1', { silent: true }, function() { 260 | return file(app, '../templates/lgpl-2.1.tmpl'); 261 | }); 262 | 263 | /** 264 | * Generate a(n) `lgpl-3.0` license file to the current working directory. 265 | * 266 | * ```sh 267 | * $ gen license:lgpl-3.0 268 | * $ gen license:lgpl-3.0 --dest ./foo 269 | * ``` 270 | * @name lgpl-3.0 271 | * @api public 272 | */ 273 | 274 | app.task('lgpl-3.0', ['license-lgpl-3.0']); 275 | app.task('license-lgpl-3.0', { silent: true }, ['gpl-3.0'], function() { 276 | return file(app, '../templates/lgpl-3.0.tmpl'); 277 | }); 278 | 279 | /** 280 | * Generate a(n) `isc` license file to the current working directory. 281 | * 282 | * ```sh 283 | * $ gen license:isc 284 | * $ gen license:isc --dest ./foo 285 | * ``` 286 | * @name isc 287 | * @api public 288 | */ 289 | 290 | app.task('isc', ['license-isc']); 291 | app.task('license-isc', { silent: true }, function() { 292 | return file(app, '../templates/isc.tmpl'); 293 | }); 294 | 295 | /** 296 | * Generate a(n) `lppl-1.3c` license file to the current working directory. 297 | * 298 | * ```sh 299 | * $ gen license:lppl-1.3c 300 | * $ gen license:lppl-1.3c --dest ./foo 301 | * ``` 302 | * @name lppl-1.3c 303 | * @api public 304 | */ 305 | 306 | app.task('lppl-1.3c', ['license-lppl-1.3c']); 307 | app.task('license-lppl-1.3c', { silent: true }, function() { 308 | return file(app, '../templates/lppl-1.3c.tmpl'); 309 | }); 310 | 311 | /** 312 | * Generate a(n) `mit` license file to the current working directory. 313 | * 314 | * ```sh 315 | * $ gen license:mit 316 | * $ gen license:mit --dest ./foo 317 | * ``` 318 | * @name mit 319 | * @api public 320 | */ 321 | 322 | app.task('mit', ['license-mit']); 323 | app.task('license-mit', { silent: true }, function() { 324 | return file(app, '../templates/mit.tmpl'); 325 | }); 326 | 327 | /** 328 | * Generate a(n) `ms-pl` license file to the current working directory. 329 | * 330 | * ```sh 331 | * $ gen license:ms-pl 332 | * $ gen license:ms-pl --dest ./foo 333 | * ``` 334 | * @name ms-pl 335 | * @api public 336 | */ 337 | 338 | app.task('ms-pl', ['license-ms-pl']); 339 | app.task('license-ms-pl', { silent: true }, function() { 340 | return file(app, '../templates/ms-pl.tmpl'); 341 | }); 342 | 343 | /** 344 | * Generate a(n) `ms-rl` license file to the current working directory. 345 | * 346 | * ```sh 347 | * $ gen license:ms-rl 348 | * $ gen license:ms-rl --dest ./foo 349 | * ``` 350 | * @name ms-rl 351 | * @api public 352 | */ 353 | 354 | app.task('ms-rl', ['license-ms-rl']); 355 | app.task('license-ms-rl', { silent: true }, function() { 356 | return file(app, '../templates/ms-rl.tmpl'); 357 | }); 358 | 359 | /** 360 | * Generate a(n) `mpl-2.0` license file to the current working directory. 361 | * 362 | * ```sh 363 | * $ gen license:mpl-2.0 364 | * $ gen license:mpl-2.0 --dest ./foo 365 | * ``` 366 | * @name mpl-2.0 367 | * @api public 368 | */ 369 | 370 | app.task('mpl-2.0', ['license-mpl-2.0']); 371 | app.task('license-mpl-2.0', { silent: true }, function() { 372 | return file(app, '../templates/mpl-2.0.tmpl'); 373 | }); 374 | 375 | /** 376 | * Generate a(n) `osl-3.0` license file to the current working directory. 377 | * 378 | * ```sh 379 | * $ gen license:osl-3.0 380 | * $ gen license:osl-3.0 --dest ./foo 381 | * ``` 382 | * @name osl-3.0 383 | * @api public 384 | */ 385 | 386 | app.task('osl-3.0', ['license-osl-3.0']); 387 | app.task('license-osl-3.0', { silent: true }, function() { 388 | return file(app, '../templates/osl-3.0.tmpl'); 389 | }); 390 | 391 | /** 392 | * Generate a(n) `ofl-1.1` license file to the current working directory. 393 | * 394 | * ```sh 395 | * $ gen license:ofl-1.1 396 | * $ gen license:ofl-1.1 --dest ./foo 397 | * ``` 398 | * @name ofl-1.1 399 | * @api public 400 | */ 401 | 402 | app.task('ofl-1.1', ['license-ofl-1.1']); 403 | app.task('license-ofl-1.1', { silent: true }, function() { 404 | return file(app, '../templates/ofl-1.1.tmpl'); 405 | }); 406 | 407 | /** 408 | * Generate a(n) `unlicense` license file to the current working directory. 409 | * 410 | * ```sh 411 | * $ gen license:unlicense 412 | * $ gen license:unlicense --dest ./foo 413 | * ``` 414 | * @name unlicense 415 | * @api public 416 | */ 417 | 418 | app.task('unlicense', ['license-unlicense']); 419 | app.task('license-unlicense', { silent: true }, function() { 420 | return file(app, '../templates/unlicense.tmpl'); 421 | }); 422 | 423 | /** 424 | * Generate a(n) `zlib` license file to the current working directory. 425 | * 426 | * ```sh 427 | * $ gen license:zlib 428 | * $ gen license:zlib --dest ./foo 429 | * ``` 430 | * @name zlib 431 | * @api public 432 | */ 433 | 434 | app.task('zlib', ['license-zlib']); 435 | app.task('license-zlib', { silent: true }, function() { 436 | return file(app, '../templates/zlib.tmpl'); 437 | }); 438 | 439 | }; 440 | -------------------------------------------------------------------------------- /tasks/support/choices.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | # Template based on https://github.com/pointnet/generate-templates-transform 3 | rename: 4 | dirname: 'tasks' 5 | basename: 'choices.js' 6 | --- 7 | 'use strict'; 8 | 9 | module.exports = [<% tasks.forEach(function(task) { %> 10 | { name: ['<%= task.description %>'], id: '<%= task.name %>', value: 'license-<%= task.name %>' },<% }); %> 11 | ]; 12 | -------------------------------------------------------------------------------- /tasks/support/tasks.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | # Template based on https://github.com/pointnet/generate-templates-transform 3 | rename: 4 | dirname: 'tasks' 5 | basename: 'index.js' 6 | --- 7 | 'use strict'; 8 | 9 | var file = require('./file'); 10 | 11 | module.exports = function(app) { 12 | 13 | <% tasks.forEach(function(task) { %> /** 14 | * Generate a(n) `<%= task.name %>` license file to the current working directory. 15 | * 16 | * ```sh 17 | * $ gen <%= alias %>:<%= task.name %> 18 | * $ gen <%= alias %>:<%= task.name %> --dest ./foo 19 | * ``` 20 | * @name <%= task.name %> 21 | * @api public 22 | */ 23 | 24 | app.task('<%= task.name %>', ['license-<%= task.name %>']); 25 | app.task('license-<%= task.name %>', { silent: true }<%= task.deps.length ? ", ['" + task.deps.join("', '") + "']":"" %>, function() { 26 | return file(app, '<%= task.path %>'); 27 | }); 28 | 29 | <% }); %>}; 30 | -------------------------------------------------------------------------------- /templates/afl-3.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Academic Free License v3.0 6 | spdx-id: AFL-3.0 7 | source: 'http://opensource.org/licenses/afl-3.0' 8 | description: >- 9 | The Academic Free License is a variant of the Open Software License that does 10 | not require that the source code of derivative works be disclosed. It contains 11 | explicit copyright and patent grants and reserves trademark rights in the 12 | author. 13 | how: >- 14 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 15 | your source code and copy the text of the license into the file. Files 16 | licensed under AFL 3.0 must also include the notice "Licensed under the 17 | Academic Free License version 3.0" adjacent to the copyright notice. 18 | conditions: 19 | - include-copyright 20 | - document-changes 21 | permissions: 22 | - commercial-use 23 | - modifications 24 | - distribution 25 | - private-use 26 | - patent-use 27 | limitations: 28 | - trademark-use 29 | - no-liability 30 | --- 31 | Academic Free License (“AFL”) v. 3.0 32 | 33 | This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: 34 | 35 | Licensed under the Academic Free License version 3.0 36 | 37 | 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: 38 | 39 | a) to reproduce the Original Work in copies, either alone or as part of a collective work; 40 | b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; 41 | c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor’s reserved rights and remedies, in this Academic Free License; 42 | d) to perform the Original Work publicly; and 43 | e) to display the Original Work publicly. 44 | 45 | 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. 46 | 47 | 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. 48 | 49 | 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. 50 | 51 | 5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). 52 | 53 | 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 54 | 55 | 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. 56 | 57 | 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. 58 | 59 | 9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). 60 | 61 | 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. 62 | 63 | 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. 64 | 65 | 12) Attorneys’ Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 66 | 67 | 13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 68 | 69 | 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 70 | 71 | 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. 72 | 73 | 16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. 74 | -------------------------------------------------------------------------------- /templates/apache-2.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Apache License 2.0 6 | spdx-id: Apache-2.0 7 | redirect_from: /licenses/apache/ 8 | source: 'http://www.apache.org/licenses/LICENSE-2.0.html' 9 | featured: true 10 | hidden: false 11 | description: >- 12 | A permissive license whose main conditions require preservation of copyright 13 | and license notices. Contributors provide an express grant of patent rights. 14 | Licensed works, modifications, and larger works may be distributed under 15 | different terms and without source code. 16 | how: >- 17 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 18 | your source code and copy the text of the license into the file. 19 | note: >- 20 | The Apache Foundation recommends taking the additional step of adding a 21 | boilerplate notice to the header of each source file. You can find the notice 22 | at the very end of the license in the appendix. 23 | using: 24 | - Android: 'https://github.com/android/platform_system_core/blob/master/NOTICE' 25 | - Apache: 'https://svn.apache.org/viewvc/httpd/httpd/trunk/LICENSE?view=markup' 26 | - Swift: 'https://github.com/apple/swift/blob/master/LICENSE.txt' 27 | conditions: 28 | - include-copyright 29 | - document-changes 30 | permissions: 31 | - commercial-use 32 | - modifications 33 | - distribution 34 | - patent-use 35 | - private-use 36 | limitations: 37 | - trademark-use 38 | - no-liability 39 | --- 40 | Apache License 41 | Version 2.0, January 2004 42 | http://www.apache.org/licenses/ 43 | 44 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 45 | 46 | 1. Definitions. 47 | 48 | "License" shall mean the terms and conditions for use, reproduction, 49 | and distribution as defined by Sections 1 through 9 of this document. 50 | 51 | "Licensor" shall mean the copyright owner or entity authorized by 52 | the copyright owner that is granting the License. 53 | 54 | "Legal Entity" shall mean the union of the acting entity and all 55 | other entities that control, are controlled by, or are under common 56 | control with that entity. For the purposes of this definition, 57 | "control" means (i) the power, direct or indirect, to cause the 58 | direction or management of such entity, whether by contract or 59 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 60 | outstanding shares, or (iii) beneficial ownership of such entity. 61 | 62 | "You" (or "Your") shall mean an individual or Legal Entity 63 | exercising permissions granted by this License. 64 | 65 | "Source" form shall mean the preferred form for making modifications, 66 | including but not limited to software source code, documentation 67 | source, and configuration files. 68 | 69 | "Object" form shall mean any form resulting from mechanical 70 | transformation or translation of a Source form, including but 71 | not limited to compiled object code, generated documentation, 72 | and conversions to other media types. 73 | 74 | "Work" shall mean the work of authorship, whether in Source or 75 | Object form, made available under the License, as indicated by a 76 | copyright notice that is included in or attached to the work 77 | (an example is provided in the Appendix below). 78 | 79 | "Derivative Works" shall mean any work, whether in Source or Object 80 | form, that is based on (or derived from) the Work and for which the 81 | editorial revisions, annotations, elaborations, or other modifications 82 | represent, as a whole, an original work of authorship. For the purposes 83 | of this License, Derivative Works shall not include works that remain 84 | separable from, or merely link (or bind by name) to the interfaces of, 85 | the Work and Derivative Works thereof. 86 | 87 | "Contribution" shall mean any work of authorship, including 88 | the original version of the Work and any modifications or additions 89 | to that Work or Derivative Works thereof, that is intentionally 90 | submitted to Licensor for inclusion in the Work by the copyright owner 91 | or by an individual or Legal Entity authorized to submit on behalf of 92 | the copyright owner. For the purposes of this definition, "submitted" 93 | means any form of electronic, verbal, or written communication sent 94 | to the Licensor or its representatives, including but not limited to 95 | communication on electronic mailing lists, source code control systems, 96 | and issue tracking systems that are managed by, or on behalf of, the 97 | Licensor for the purpose of discussing and improving the Work, but 98 | excluding communication that is conspicuously marked or otherwise 99 | designated in writing by the copyright owner as "Not a Contribution." 100 | 101 | "Contributor" shall mean Licensor and any individual or Legal Entity 102 | on behalf of whom a Contribution has been received by Licensor and 103 | subsequently incorporated within the Work. 104 | 105 | 2. Grant of Copyright License. Subject to the terms and conditions of 106 | this License, each Contributor hereby grants to You a perpetual, 107 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 108 | copyright license to reproduce, prepare Derivative Works of, 109 | publicly display, publicly perform, sublicense, and distribute the 110 | Work and such Derivative Works in Source or Object form. 111 | 112 | 3. Grant of Patent License. Subject to the terms and conditions of 113 | this License, each Contributor hereby grants to You a perpetual, 114 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 115 | (except as stated in this section) patent license to make, have made, 116 | use, offer to sell, sell, import, and otherwise transfer the Work, 117 | where such license applies only to those patent claims licensable 118 | by such Contributor that are necessarily infringed by their 119 | Contribution(s) alone or by combination of their Contribution(s) 120 | with the Work to which such Contribution(s) was submitted. If You 121 | institute patent litigation against any entity (including a 122 | cross-claim or counterclaim in a lawsuit) alleging that the Work 123 | or a Contribution incorporated within the Work constitutes direct 124 | or contributory patent infringement, then any patent licenses 125 | granted to You under this License for that Work shall terminate 126 | as of the date such litigation is filed. 127 | 128 | 4. Redistribution. You may reproduce and distribute copies of the 129 | Work or Derivative Works thereof in any medium, with or without 130 | modifications, and in Source or Object form, provided that You 131 | meet the following conditions: 132 | 133 | (a) You must give any other recipients of the Work or 134 | Derivative Works a copy of this License; and 135 | 136 | (b) You must cause any modified files to carry prominent notices 137 | stating that You changed the files; and 138 | 139 | (c) You must retain, in the Source form of any Derivative Works 140 | that You distribute, all copyright, patent, trademark, and 141 | attribution notices from the Source form of the Work, 142 | excluding those notices that do not pertain to any part of 143 | the Derivative Works; and 144 | 145 | (d) If the Work includes a "NOTICE" text file as part of its 146 | distribution, then any Derivative Works that You distribute must 147 | include a readable copy of the attribution notices contained 148 | within such NOTICE file, excluding those notices that do not 149 | pertain to any part of the Derivative Works, in at least one 150 | of the following places: within a NOTICE text file distributed 151 | as part of the Derivative Works; within the Source form or 152 | documentation, if provided along with the Derivative Works; or, 153 | within a display generated by the Derivative Works, if and 154 | wherever such third-party notices normally appear. The contents 155 | of the NOTICE file are for informational purposes only and 156 | do not modify the License. You may add Your own attribution 157 | notices within Derivative Works that You distribute, alongside 158 | or as an addendum to the NOTICE text from the Work, provided 159 | that such additional attribution notices cannot be construed 160 | as modifying the License. 161 | 162 | You may add Your own copyright statement to Your modifications and 163 | may provide additional or different license terms and conditions 164 | for use, reproduction, or distribution of Your modifications, or 165 | for any such Derivative Works as a whole, provided Your use, 166 | reproduction, and distribution of the Work otherwise complies with 167 | the conditions stated in this License. 168 | 169 | 5. Submission of Contributions. Unless You explicitly state otherwise, 170 | any Contribution intentionally submitted for inclusion in the Work 171 | by You to the Licensor shall be under the terms and conditions of 172 | this License, without any additional terms or conditions. 173 | Notwithstanding the above, nothing herein shall supersede or modify 174 | the terms of any separate license agreement you may have executed 175 | with Licensor regarding such Contributions. 176 | 177 | 6. Trademarks. This License does not grant permission to use the trade 178 | names, trademarks, service marks, or product names of the Licensor, 179 | except as required for reasonable and customary use in describing the 180 | origin of the Work and reproducing the content of the NOTICE file. 181 | 182 | 7. Disclaimer of Warranty. Unless required by applicable law or 183 | agreed to in writing, Licensor provides the Work (and each 184 | Contributor provides its Contributions) on an "AS IS" BASIS, 185 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 186 | implied, including, without limitation, any warranties or conditions 187 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 188 | PARTICULAR PURPOSE. You are solely responsible for determining the 189 | appropriateness of using or redistributing the Work and assume any 190 | risks associated with Your exercise of permissions under this License. 191 | 192 | 8. Limitation of Liability. In no event and under no legal theory, 193 | whether in tort (including negligence), contract, or otherwise, 194 | unless required by applicable law (such as deliberate and grossly 195 | negligent acts) or agreed to in writing, shall any Contributor be 196 | liable to You for damages, including any direct, indirect, special, 197 | incidental, or consequential damages of any character arising as a 198 | result of this License or out of the use or inability to use the 199 | Work (including but not limited to damages for loss of goodwill, 200 | work stoppage, computer failure or malfunction, or any and all 201 | other commercial damages or losses), even if such Contributor 202 | has been advised of the possibility of such damages. 203 | 204 | 9. Accepting Warranty or Additional Liability. While redistributing 205 | the Work or Derivative Works thereof, You may choose to offer, 206 | and charge a fee for, acceptance of support, warranty, indemnity, 207 | or other liability obligations and/or rights consistent with this 208 | License. However, in accepting such obligations, You may act only 209 | on Your own behalf and on Your sole responsibility, not on behalf 210 | of any other Contributor, and only if You agree to indemnify, 211 | defend, and hold each Contributor harmless for any liability 212 | incurred by, or claims asserted against, such Contributor by reason 213 | of your accepting any such warranty or additional liability. 214 | 215 | END OF TERMS AND CONDITIONS 216 | 217 | APPENDIX: How to apply the Apache License to your work. 218 | 219 | To apply the Apache License to your work, attach the following 220 | boilerplate notice, with the fields enclosed by brackets "{}" 221 | replaced with your own identifying information. (Don't include 222 | the brackets!) The text should be enclosed in the appropriate 223 | comment syntax for the file format. We also recommend that a 224 | file or class name and description of purpose be included on the 225 | same "printed page" as the copyright notice for easier 226 | identification within third-party archives. 227 | 228 | Copyright {yyyy} {name of copyright owner} 229 | 230 | Licensed under the Apache License, Version 2.0 (the "License"); 231 | you may not use this file except in compliance with the License. 232 | You may obtain a copy of the License at 233 | 234 | http://www.apache.org/licenses/LICENSE-2.0 235 | 236 | Unless required by applicable law or agreed to in writing, software 237 | distributed under the License is distributed on an "AS IS" BASIS, 238 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 239 | See the License for the specific language governing permissions and 240 | limitations under the License. 241 | -------------------------------------------------------------------------------- /templates/artistic-2.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Artistic License 2.0 6 | spdx-id: Artistic-2.0 7 | redirect_from: /licenses/artistic/ 8 | source: 'http://www.perlfoundation.org/attachment/legal/artistic-2_0.txt' 9 | description: >- 10 | Heavily favored by the Perl community, the Artistic license requires that 11 | modified versions of the software do not prevent users from running the 12 | standard version. 13 | how: >- 14 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 15 | your source code, and copy the text of the license into the file. Do not 16 | replace the copyright notice (year, author), which refers to the license 17 | itself, not the licensed project. 18 | conditions: 19 | - include-copyright 20 | - document-changes 21 | permissions: 22 | - commercial-use 23 | - modifications 24 | - distribution 25 | - patent-use 26 | - private-use 27 | limitations: 28 | - no-liability 29 | - trademark-use 30 | --- 31 | The Artistic License 2.0 32 | 33 | Copyright (c) 2000-2006, The Perl Foundation. 34 | 35 | Everyone is permitted to copy and distribute verbatim copies 36 | of this license document, but changing it is not allowed. 37 | 38 | Preamble 39 | 40 | This license establishes the terms under which a given free software 41 | Package may be copied, modified, distributed, and/or redistributed. 42 | The intent is that the Copyright Holder maintains some artistic 43 | control over the development of that Package while still keeping the 44 | Package available as open source and free software. 45 | 46 | You are always permitted to make arrangements wholly outside of this 47 | license directly with the Copyright Holder of a given Package. If the 48 | terms of this license do not permit the full use that you propose to 49 | make of the Package, you should contact the Copyright Holder and seek 50 | a different licensing arrangement. 51 | 52 | Definitions 53 | 54 | "Copyright Holder" means the individual(s) or organization(s) 55 | named in the copyright notice for the entire Package. 56 | 57 | "Contributor" means any party that has contributed code or other 58 | material to the Package, in accordance with the Copyright Holder's 59 | procedures. 60 | 61 | "You" and "your" means any person who would like to copy, 62 | distribute, or modify the Package. 63 | 64 | "Package" means the collection of files distributed by the 65 | Copyright Holder, and derivatives of that collection and/or of 66 | those files. A given Package may consist of either the Standard 67 | Version, or a Modified Version. 68 | 69 | "Distribute" means providing a copy of the Package or making it 70 | accessible to anyone else, or in the case of a company or 71 | organization, to others outside of your company or organization. 72 | 73 | "Distributor Fee" means any fee that you charge for Distributing 74 | this Package or providing support for this Package to another 75 | party. It does not mean licensing fees. 76 | 77 | "Standard Version" refers to the Package if it has not been 78 | modified, or has been modified only in ways explicitly requested 79 | by the Copyright Holder. 80 | 81 | "Modified Version" means the Package, if it has been changed, and 82 | such changes were not explicitly requested by the Copyright 83 | Holder. 84 | 85 | "Original License" means this Artistic License as Distributed with 86 | the Standard Version of the Package, in its current version or as 87 | it may be modified by The Perl Foundation in the future. 88 | 89 | "Source" form means the source code, documentation source, and 90 | configuration files for the Package. 91 | 92 | "Compiled" form means the compiled bytecode, object code, binary, 93 | or any other form resulting from mechanical transformation or 94 | translation of the Source form. 95 | 96 | 97 | Permission for Use and Modification Without Distribution 98 | 99 | (1) You are permitted to use the Standard Version and create and use 100 | Modified Versions for any purpose without restriction, provided that 101 | you do not Distribute the Modified Version. 102 | 103 | 104 | Permissions for Redistribution of the Standard Version 105 | 106 | (2) You may Distribute verbatim copies of the Source form of the 107 | Standard Version of this Package in any medium without restriction, 108 | either gratis or for a Distributor Fee, provided that you duplicate 109 | all of the original copyright notices and associated disclaimers. At 110 | your discretion, such verbatim copies may or may not include a 111 | Compiled form of the Package. 112 | 113 | (3) You may apply any bug fixes, portability changes, and other 114 | modifications made available from the Copyright Holder. The resulting 115 | Package will still be considered the Standard Version, and as such 116 | will be subject to the Original License. 117 | 118 | 119 | Distribution of Modified Versions of the Package as Source 120 | 121 | (4) You may Distribute your Modified Version as Source (either gratis 122 | or for a Distributor Fee, and with or without a Compiled form of the 123 | Modified Version) provided that you clearly document how it differs 124 | from the Standard Version, including, but not limited to, documenting 125 | any non-standard features, executables, or modules, and provided that 126 | you do at least ONE of the following: 127 | 128 | (a) make the Modified Version available to the Copyright Holder 129 | of the Standard Version, under the Original License, so that the 130 | Copyright Holder may include your modifications in the Standard 131 | Version. 132 | 133 | (b) ensure that installation of your Modified Version does not 134 | prevent the user installing or running the Standard Version. In 135 | addition, the Modified Version must bear a name that is different 136 | from the name of the Standard Version. 137 | 138 | (c) allow anyone who receives a copy of the Modified Version to 139 | make the Source form of the Modified Version available to others 140 | under 141 | 142 | (i) the Original License or 143 | 144 | (ii) a license that permits the licensee to freely copy, 145 | modify and redistribute the Modified Version using the same 146 | licensing terms that apply to the copy that the licensee 147 | received, and requires that the Source form of the Modified 148 | Version, and of any works derived from it, be made freely 149 | available in that license fees are prohibited but Distributor 150 | Fees are allowed. 151 | 152 | 153 | Distribution of Compiled Forms of the Standard Version 154 | or Modified Versions without the Source 155 | 156 | (5) You may Distribute Compiled forms of the Standard Version without 157 | the Source, provided that you include complete instructions on how to 158 | get the Source of the Standard Version. Such instructions must be 159 | valid at the time of your distribution. If these instructions, at any 160 | time while you are carrying out such distribution, become invalid, you 161 | must provide new instructions on demand or cease further distribution. 162 | If you provide valid instructions or cease distribution within thirty 163 | days after you become aware that the instructions are invalid, then 164 | you do not forfeit any of your rights under this license. 165 | 166 | (6) You may Distribute a Modified Version in Compiled form without 167 | the Source, provided that you comply with Section 4 with respect to 168 | the Source of the Modified Version. 169 | 170 | 171 | Aggregating or Linking the Package 172 | 173 | (7) You may aggregate the Package (either the Standard Version or 174 | Modified Version) with other packages and Distribute the resulting 175 | aggregation provided that you do not charge a licensing fee for the 176 | Package. Distributor Fees are permitted, and licensing fees for other 177 | components in the aggregation are permitted. The terms of this license 178 | apply to the use and Distribution of the Standard or Modified Versions 179 | as included in the aggregation. 180 | 181 | (8) You are permitted to link Modified and Standard Versions with 182 | other works, to embed the Package in a larger work of your own, or to 183 | build stand-alone binary or bytecode versions of applications that 184 | include the Package, and Distribute the result without restriction, 185 | provided the result does not expose a direct interface to the Package. 186 | 187 | 188 | Items That are Not Considered Part of a Modified Version 189 | 190 | (9) Works (including, but not limited to, modules and scripts) that 191 | merely extend or make use of the Package, do not, by themselves, cause 192 | the Package to be a Modified Version. In addition, such works are not 193 | considered parts of the Package itself, and are not subject to the 194 | terms of this license. 195 | 196 | 197 | General Provisions 198 | 199 | (10) Any use, modification, and distribution of the Standard or 200 | Modified Versions is governed by this Artistic License. By using, 201 | modifying or distributing the Package, you accept this license. Do not 202 | use, modify, or distribute the Package, if you do not accept this 203 | license. 204 | 205 | (11) If your Modified Version has been derived from a Modified 206 | Version made by someone other than you, you are nevertheless required 207 | to ensure that your Modified Version complies with the requirements of 208 | this license. 209 | 210 | (12) This license does not grant you the right to use any trademark, 211 | service mark, tradename, or logo of the Copyright Holder. 212 | 213 | (13) This license includes the non-exclusive, worldwide, 214 | free-of-charge patent license to make, have made, use, offer to sell, 215 | sell, import and otherwise transfer the Package with respect to any 216 | patent claims licensable by the Copyright Holder that are necessarily 217 | infringed by the Package. If you institute patent litigation 218 | (including a cross-claim or counterclaim) against any party alleging 219 | that the Package constitutes direct or contributory patent 220 | infringement, then this Artistic License to you shall terminate on the 221 | date that such litigation is filed. 222 | 223 | (14) Disclaimer of Warranty: 224 | THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS 225 | IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED 226 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR 227 | NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL 228 | LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL 229 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 230 | DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF 231 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 232 | -------------------------------------------------------------------------------- /templates/bsd-2-clause.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: BSD 2-clause "Simplified" License 6 | spdx-id: BSD-2-Clause 7 | redirect_from: /licenses/bsd/ 8 | source: 'http://opensource.org/licenses/BSD-2-Clause' 9 | description: >- 10 | A permissive license that comes in two variants, the BSD 2-Clause and BSD 3-Clause. Both have very minute 13 | differences to the MIT license. 14 | how: >- 15 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 16 | your source code and copy the text of the license into the file. Replace 17 | [year] with the current year and [fullname] with the name (or names) of the 18 | copyright holders. 19 | conditions: 20 | - include-copyright 21 | permissions: 22 | - commercial-use 23 | - modifications 24 | - distribution 25 | - private-use 26 | limitations: 27 | - no-liability 28 | --- 29 | BSD 2-Clause License 30 | 31 | Copyright (c) <%= year %>, <%= ask("author.name", "Author's full name?") %> 32 | All rights reserved. 33 | 34 | Redistribution and use in source and binary forms, with or without 35 | modification, are permitted provided that the following conditions are met: 36 | 37 | * Redistributions of source code must retain the above copyright notice, this 38 | list of conditions and the following disclaimer. 39 | 40 | * Redistributions in binary form must reproduce the above copyright notice, 41 | this list of conditions and the following disclaimer in the documentation 42 | and/or other materials provided with the distribution. 43 | 44 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 45 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 46 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 47 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 48 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 49 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 50 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 51 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 52 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 53 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 | -------------------------------------------------------------------------------- /templates/bsd-3-clause-clear.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: BSD 3-clause Clear License 6 | spdx-id: BSD-3-Clause-Clear 7 | description: >- 8 | A variant of the BSD 3-Clause License 9 | that explicitly does not grant any patent rights. 10 | how: >- 11 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 12 | your source code and copy the text of the license into the file. Replace 13 | [year] with the current year and [fullname] with the name (or names) of the 14 | copyright holders. Replace [project] with the project organization, if any, 15 | that sponsors this work. 16 | source: 'https://spdx.org/licenses/BSD-3-Clause-Clear.html' 17 | conditions: 18 | - include-copyright 19 | permissions: 20 | - commercial-use 21 | - modifications 22 | - distribution 23 | - private-use 24 | limitations: 25 | - no-liability 26 | - patent-use 27 | --- 28 | The Clear BSD License 29 | 30 | Copyright (c) <%= year %>, <%= ask("author.name", "Author's full name?") %> 31 | All rights reserved. 32 | 33 | Redistribution and use in source and binary forms, with or without 34 | modification, are permitted (subject to the limitations in the disclaimer 35 | below) provided that the following conditions are met: 36 | 37 | * Redistributions of source code must retain the above copyright notice, this 38 | list of conditions and the following disclaimer. 39 | 40 | * Redistributions in binary form must reproduce the above copyright notice, 41 | this list of conditions and the following disclaimer in the documentation 42 | and/or other materials provided with the distribution. 43 | 44 | * Neither the name of the copyright holder nor the names of its contributors may be used 45 | to endorse or promote products derived from this software without specific 46 | prior written permission. 47 | 48 | NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS 49 | LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 50 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 51 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 52 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 53 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 54 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 55 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 56 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 57 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 58 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 59 | DAMAGE. 60 | -------------------------------------------------------------------------------- /templates/bsd-3-clause.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: BSD 3-clause "New" or "Revised" License 6 | spdx-id: BSD-3-Clause 7 | source: 'http://opensource.org/licenses/BSD-3-Clause' 8 | description: >- 9 | A permissive license similar to the BSD 10 | 2-Clause License, but with a 3rd clause that prohibits others from using 11 | the name of the project or its contributors to promote derived products 12 | without written consent. 13 | how: >- 14 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 15 | your source code and copy the text of the license into the file. Replace 16 | [year] with the current year and [fullname] with the name (or names) of the 17 | copyright holders. Replace [project] with the project organization, if any, 18 | that sponsors this work. 19 | conditions: 20 | - include-copyright 21 | permissions: 22 | - commercial-use 23 | - modifications 24 | - distribution 25 | - private-use 26 | limitations: 27 | - no-liability 28 | --- 29 | BSD 3-Clause License 30 | 31 | Copyright (c) <%= year %>, <%= ask("author.name", "Author's full name?") %> 32 | All rights reserved. 33 | 34 | Redistribution and use in source and binary forms, with or without 35 | modification, are permitted provided that the following conditions are met: 36 | 37 | * Redistributions of source code must retain the above copyright notice, this 38 | list of conditions and the following disclaimer. 39 | 40 | * Redistributions in binary form must reproduce the above copyright notice, 41 | this list of conditions and the following disclaimer in the documentation 42 | and/or other materials provided with the distribution. 43 | 44 | * Neither the name of the copyright holder nor the names of its 45 | contributors may be used to endorse or promote products derived from 46 | this software without specific prior written permission. 47 | 48 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 49 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 50 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 51 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 52 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 53 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 54 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 55 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 56 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 57 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 58 | -------------------------------------------------------------------------------- /templates/cc0-1.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Creative Commons Zero v1.0 Universal 6 | spdx-id: CC0-1.0 7 | redirect_from: /licenses/cc0/ 8 | source: 'http://creativecommons.org/publicdomain/zero/1.0/' 9 | description: >- 10 | The Creative 11 | Commons CC0 Public Domain Dedication waives copyright interest in any a 12 | work you've created and dedicates it to the world-wide public domain. Use CC0 13 | to opt out of copyright entirely and ensure your work has the widest reach. As 14 | with the Unlicense and typical software licenses, CC0 disclaims warranties. 15 | CC0 is very similar to the Unlicense. 16 | how: >- 17 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 18 | your source code and copy the text of the CC0 into the file. 19 | note: >- 20 | Creative Commons recommends taking the additional step of adding a boilerplate 21 | notice to the top of each file. The boilerplate can be found 23 | on their website. 24 | permissions: 25 | - commercial-use 26 | - modifications 27 | - distribution 28 | - private-use 29 | conditions: [] 30 | limitations: 31 | - no-liability 32 | - trademark-use 33 | - patent-use 34 | --- 35 | CC0 1.0 Universal 36 | 37 | Statement of Purpose 38 | 39 | The laws of most jurisdictions throughout the world automatically confer 40 | exclusive Copyright and Related Rights (defined below) upon the creator and 41 | subsequent owner(s) (each and all, an "owner") of an original work of 42 | authorship and/or a database (each, a "Work"). 43 | 44 | Certain owners wish to permanently relinquish those rights to a Work for the 45 | purpose of contributing to a commons of creative, cultural and scientific 46 | works ("Commons") that the public can reliably and without fear of later 47 | claims of infringement build upon, modify, incorporate in other works, reuse 48 | and redistribute as freely as possible in any form whatsoever and for any 49 | purposes, including without limitation commercial purposes. These owners may 50 | contribute to the Commons to promote the ideal of a free culture and the 51 | further production of creative, cultural and scientific works, or to gain 52 | reputation or greater distribution for their Work in part through the use and 53 | efforts of others. 54 | 55 | For these and/or other purposes and motivations, and without any expectation 56 | of additional consideration or compensation, the person associating CC0 with a 57 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 58 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 59 | and publicly distribute the Work under its terms, with knowledge of his or her 60 | Copyright and Related Rights in the Work and the meaning and intended legal 61 | effect of CC0 on those rights. 62 | 63 | 1. Copyright and Related Rights. A Work made available under CC0 may be 64 | protected by copyright and related or neighboring rights ("Copyright and 65 | Related Rights"). Copyright and Related Rights include, but are not limited 66 | to, the following: 67 | 68 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 69 | and translate a Work; 70 | 71 | ii. moral rights retained by the original author(s) and/or performer(s); 72 | 73 | iii. publicity and privacy rights pertaining to a person's image or likeness 74 | depicted in a Work; 75 | 76 | iv. rights protecting against unfair competition in regards to a Work, 77 | subject to the limitations in paragraph 4(a), below; 78 | 79 | v. rights protecting the extraction, dissemination, use and reuse of data in 80 | a Work; 81 | 82 | vi. database rights (such as those arising under Directive 96/9/EC of the 83 | European Parliament and of the Council of 11 March 1996 on the legal 84 | protection of databases, and under any national implementation thereof, 85 | including any amended or successor version of such directive); and 86 | 87 | vii. other similar, equivalent or corresponding rights throughout the world 88 | based on applicable law or treaty, and any national implementations thereof. 89 | 90 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 91 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 92 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 93 | and Related Rights and associated claims and causes of action, whether now 94 | known or unknown (including existing as well as future claims and causes of 95 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 96 | duration provided by applicable law or treaty (including future time 97 | extensions), (iii) in any current or future medium and for any number of 98 | copies, and (iv) for any purpose whatsoever, including without limitation 99 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 100 | the Waiver for the benefit of each member of the public at large and to the 101 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 102 | shall not be subject to revocation, rescission, cancellation, termination, or 103 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 104 | by the public as contemplated by Affirmer's express Statement of Purpose. 105 | 106 | 3. Public License Fallback. Should any part of the Waiver for any reason be 107 | judged legally invalid or ineffective under applicable law, then the Waiver 108 | shall be preserved to the maximum extent permitted taking into account 109 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 110 | is so judged Affirmer hereby grants to each affected person a royalty-free, 111 | non transferable, non sublicensable, non exclusive, irrevocable and 112 | unconditional license to exercise Affirmer's Copyright and Related Rights in 113 | the Work (i) in all territories worldwide, (ii) for the maximum duration 114 | provided by applicable law or treaty (including future time extensions), (iii) 115 | in any current or future medium and for any number of copies, and (iv) for any 116 | purpose whatsoever, including without limitation commercial, advertising or 117 | promotional purposes (the "License"). The License shall be deemed effective as 118 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 119 | License for any reason be judged legally invalid or ineffective under 120 | applicable law, such partial invalidity or ineffectiveness shall not 121 | invalidate the remainder of the License, and in such case Affirmer hereby 122 | affirms that he or she will not (i) exercise any of his or her remaining 123 | Copyright and Related Rights in the Work or (ii) assert any associated claims 124 | and causes of action with respect to the Work, in either case contrary to 125 | Affirmer's express Statement of Purpose. 126 | 127 | 4. Limitations and Disclaimers. 128 | 129 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 130 | surrendered, licensed or otherwise affected by this document. 131 | 132 | b. Affirmer offers the Work as-is and makes no representations or warranties 133 | of any kind concerning the Work, express, implied, statutory or otherwise, 134 | including without limitation warranties of title, merchantability, fitness 135 | for a particular purpose, non infringement, or the absence of latent or 136 | other defects, accuracy, or the present or absence of errors, whether or not 137 | discoverable, all to the greatest extent permissible under applicable law. 138 | 139 | c. Affirmer disclaims responsibility for clearing rights of other persons 140 | that may apply to the Work or any use thereof, including without limitation 141 | any person's Copyright and Related Rights in the Work. Further, Affirmer 142 | disclaims responsibility for obtaining any necessary consents, permissions 143 | or other rights required for any use of the Work. 144 | 145 | d. Affirmer understands and acknowledges that Creative Commons is not a 146 | party to this document and has no duty or obligation with respect to this 147 | CC0 or use of the Work. 148 | 149 | For more information, please see 150 | 151 | -------------------------------------------------------------------------------- /templates/epl-1.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Eclipse Public License 1.0 6 | spdx-id: EPL-1.0 7 | redirect_from: /licenses/eclipse/ 8 | source: 'https://www.eclipse.org/legal/epl-v10.html' 9 | description: >- 10 | This commercially-friendly copyleft license provides the ability to 11 | commercially license binaries; a modern royalty-free patent license grant; and 12 | the ability for linked works to use other licenses, including commercial ones. 13 | how: >- 14 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 15 | your source code and copy the text of the license into the file. 16 | using: 17 | - Clojure: 'https://github.com/clojure/clojure/blob/master/epl-v10.html' 18 | - JUnit: 'https://github.com/junit-team/junit/blob/master/LICENSE-junit.txt' 19 | - openHAB: 'https://github.com/openhab/openhab/blob/master/LICENSE.TXT' 20 | conditions: 21 | - disclose-source 22 | - include-copyright 23 | - same-license 24 | permissions: 25 | - commercial-use 26 | - distribution 27 | - modifications 28 | - patent-use 29 | - private-use 30 | limitations: 31 | - no-liability 32 | --- 33 | Eclipse Public License - v 1.0 34 | 35 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC 36 | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM 37 | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 38 | 39 | 1. DEFINITIONS 40 | 41 | "Contribution" means: 42 | 43 | a) in the case of the initial Contributor, the initial code and documentation 44 | distributed under this Agreement, and 45 | b) in the case of each subsequent Contributor: 46 | i) changes to the Program, and 47 | ii) additions to the Program; 48 | 49 | where such changes and/or additions to the Program originate from and are 50 | distributed by that particular Contributor. A Contribution 'originates' 51 | from a Contributor if it was added to the Program by such Contributor 52 | itself or anyone acting on such Contributor's behalf. Contributions do not 53 | include additions to the Program which: (i) are separate modules of 54 | software distributed in conjunction with the Program under their own 55 | license agreement, and (ii) are not derivative works of the Program. 56 | 57 | "Contributor" means any person or entity that distributes the Program. 58 | 59 | "Licensed Patents" mean patent claims licensable by a Contributor which are 60 | necessarily infringed by the use or sale of its Contribution alone or when 61 | combined with the Program. 62 | 63 | "Program" means the Contributions distributed in accordance with this 64 | Agreement. 65 | 66 | "Recipient" means anyone who receives the Program under this Agreement, 67 | including all Contributors. 68 | 69 | 2. GRANT OF RIGHTS 70 | a) Subject to the terms of this Agreement, each Contributor hereby grants 71 | Recipient a non-exclusive, worldwide, royalty-free copyright license to 72 | reproduce, prepare derivative works of, publicly display, publicly 73 | perform, distribute and sublicense the Contribution of such Contributor, 74 | if any, and such derivative works, in source code and object code form. 75 | b) Subject to the terms of this Agreement, each Contributor hereby grants 76 | Recipient a non-exclusive, worldwide, royalty-free patent license under 77 | Licensed Patents to make, use, sell, offer to sell, import and otherwise 78 | transfer the Contribution of such Contributor, if any, in source code and 79 | object code form. This patent license shall apply to the combination of 80 | the Contribution and the Program if, at the time the Contribution is 81 | added by the Contributor, such addition of the Contribution causes such 82 | combination to be covered by the Licensed Patents. The patent license 83 | shall not apply to any other combinations which include the Contribution. 84 | No hardware per se is licensed hereunder. 85 | c) Recipient understands that although each Contributor grants the licenses 86 | to its Contributions set forth herein, no assurances are provided by any 87 | Contributor that the Program does not infringe the patent or other 88 | intellectual property rights of any other entity. Each Contributor 89 | disclaims any liability to Recipient for claims brought by any other 90 | entity based on infringement of intellectual property rights or 91 | otherwise. As a condition to exercising the rights and licenses granted 92 | hereunder, each Recipient hereby assumes sole responsibility to secure 93 | any other intellectual property rights needed, if any. For example, if a 94 | third party patent license is required to allow Recipient to distribute 95 | the Program, it is Recipient's responsibility to acquire that license 96 | before distributing the Program. 97 | d) Each Contributor represents that to its knowledge it has sufficient 98 | copyright rights in its Contribution, if any, to grant the copyright 99 | license set forth in this Agreement. 100 | 101 | 3. REQUIREMENTS 102 | 103 | A Contributor may choose to distribute the Program in object code form under 104 | its own license agreement, provided that: 105 | 106 | a) it complies with the terms and conditions of this Agreement; and 107 | b) its license agreement: 108 | i) effectively disclaims on behalf of all Contributors all warranties 109 | and conditions, express and implied, including warranties or 110 | conditions of title and non-infringement, and implied warranties or 111 | conditions of merchantability and fitness for a particular purpose; 112 | ii) effectively excludes on behalf of all Contributors all liability for 113 | damages, including direct, indirect, special, incidental and 114 | consequential damages, such as lost profits; 115 | iii) states that any provisions which differ from this Agreement are 116 | offered by that Contributor alone and not by any other party; and 117 | iv) states that source code for the Program is available from such 118 | Contributor, and informs licensees how to obtain it in a reasonable 119 | manner on or through a medium customarily used for software exchange. 120 | 121 | When the Program is made available in source code form: 122 | 123 | a) it must be made available under this Agreement; and 124 | b) a copy of this Agreement must be included with each copy of the Program. 125 | Contributors may not remove or alter any copyright notices contained 126 | within the Program. 127 | 128 | Each Contributor must identify itself as the originator of its Contribution, 129 | if 130 | any, in a manner that reasonably allows subsequent Recipients to identify the 131 | originator of the Contribution. 132 | 133 | 4. COMMERCIAL DISTRIBUTION 134 | 135 | Commercial distributors of software may accept certain responsibilities with 136 | respect to end users, business partners and the like. While this license is 137 | intended to facilitate the commercial use of the Program, the Contributor who 138 | includes the Program in a commercial product offering should do so in a manner 139 | which does not create potential liability for other Contributors. Therefore, 140 | if a Contributor includes the Program in a commercial product offering, such 141 | Contributor ("Commercial Contributor") hereby agrees to defend and indemnify 142 | every other Contributor ("Indemnified Contributor") against any losses, 143 | damages and costs (collectively "Losses") arising from claims, lawsuits and 144 | other legal actions brought by a third party against the Indemnified 145 | Contributor to the extent caused by the acts or omissions of such Commercial 146 | Contributor in connection with its distribution of the Program in a commercial 147 | product offering. The obligations in this section do not apply to any claims 148 | or Losses relating to any actual or alleged intellectual property 149 | infringement. In order to qualify, an Indemnified Contributor must: 150 | a) promptly notify the Commercial Contributor in writing of such claim, and 151 | b) allow the Commercial Contributor to control, and cooperate with the 152 | Commercial Contributor in, the defense and any related settlement 153 | negotiations. The Indemnified Contributor may participate in any such claim at 154 | its own expense. 155 | 156 | For example, a Contributor might include the Program in a commercial product 157 | offering, Product X. That Contributor is then a Commercial Contributor. If 158 | that Commercial Contributor then makes performance claims, or offers 159 | warranties related to Product X, those performance claims and warranties are 160 | such Commercial Contributor's responsibility alone. Under this section, the 161 | Commercial Contributor would have to defend claims against the other 162 | Contributors related to those performance claims and warranties, and if a 163 | court requires any other Contributor to pay any damages as a result, the 164 | Commercial Contributor must pay those damages. 165 | 166 | 5. NO WARRANTY 167 | 168 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN 169 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 170 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, 171 | NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each 172 | Recipient is solely responsible for determining the appropriateness of using 173 | and distributing the Program and assumes all risks associated with its 174 | exercise of rights under this Agreement , including but not limited to the 175 | risks and costs of program errors, compliance with applicable laws, damage to 176 | or loss of data, programs or equipment, and unavailability or interruption of 177 | operations. 178 | 179 | 6. DISCLAIMER OF LIABILITY 180 | 181 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY 182 | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, 183 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION 184 | LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 185 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 186 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 187 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY 188 | OF SUCH DAMAGES. 189 | 190 | 7. GENERAL 191 | 192 | If any provision of this Agreement is invalid or unenforceable under 193 | applicable law, it shall not affect the validity or enforceability of the 194 | remainder of the terms of this Agreement, and without further action by the 195 | parties hereto, such provision shall be reformed to the minimum extent 196 | necessary to make such provision valid and enforceable. 197 | 198 | If Recipient institutes patent litigation against any entity (including a 199 | cross-claim or counterclaim in a lawsuit) alleging that the Program itself 200 | (excluding combinations of the Program with other software or hardware) 201 | infringes such Recipient's patent(s), then such Recipient's rights granted 202 | under Section 2(b) shall terminate as of the date such litigation is filed. 203 | 204 | All Recipient's rights under this Agreement shall terminate if it fails to 205 | comply with any of the material terms or conditions of this Agreement and does 206 | not cure such failure in a reasonable period of time after becoming aware of 207 | such noncompliance. If all Recipient's rights under this Agreement terminate, 208 | Recipient agrees to cease use and distribution of the Program as soon as 209 | reasonably practicable. However, Recipient's obligations under this Agreement 210 | and any licenses granted by Recipient relating to the Program shall continue 211 | and survive. 212 | 213 | Everyone is permitted to copy and distribute copies of this Agreement, but in 214 | order to avoid inconsistency the Agreement is copyrighted and may only be 215 | modified in the following manner. The Agreement Steward reserves the right to 216 | publish new versions (including revisions) of this Agreement from time to 217 | time. No one other than the Agreement Steward has the right to modify this 218 | Agreement. The Eclipse Foundation is the initial Agreement Steward. The 219 | Eclipse Foundation may assign the responsibility to serve as the Agreement 220 | Steward to a suitable separate entity. Each new version of the Agreement will 221 | be given a distinguishing version number. The Program (including 222 | Contributions) may always be distributed subject to the version of the 223 | Agreement under which it was received. In addition, after a new version of the 224 | Agreement is published, Contributor may elect to distribute the Program 225 | (including its Contributions) under the new version. Except as expressly 226 | stated in Sections 2(a) and 2(b) above, Recipient receives no rights or 227 | licenses to the intellectual property of any Contributor under this Agreement, 228 | whether expressly, by implication, estoppel or otherwise. All rights in the 229 | Program not expressly granted under this Agreement are reserved. 230 | 231 | This Agreement is governed by the laws of the State of New York and the 232 | intellectual property laws of the United States of America. No party to this 233 | Agreement will bring a legal action under this Agreement more than one year 234 | after the cause of action arose. Each party waives its rights to a jury trial in 235 | any resulting litigation. 236 | -------------------------------------------------------------------------------- /templates/eupl-1.1.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: European Union Public License 1.1 6 | spdx-id: EUPL-1.1 7 | redirect_from: /licenses/eupl-v1.1/ 8 | source: >- 9 | https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 10 | description: >- 11 | The “European Union Public Licence” (EUPL) is a copyleft free/open source 12 | software license created on the initiative of and approved by the European 13 | Commission in 22 official languages of the European Union. 14 | how: >- 15 | Create a text file (typically named COPYING or LICENCE.txt) in the root of 16 | your source code and copy the text of the license into the file. 17 | note: >- 18 | The European Commission recommends taking the additional step of adding a 19 | [boilerplate 20 | notice](https://joinup.ec.europa.eu/sites/default/files/ckeditor_files/files/EUPL%201_1%20Guidelines%20EN%20Joinup.pdf#page=17) 21 | to the top of each file. 22 | conditions: 23 | - include-copyright 24 | - disclose-source 25 | - document-changes 26 | - network-use-disclose 27 | - same-license 28 | permissions: 29 | - commercial-use 30 | - modifications 31 | - distribution 32 | - patent-use 33 | - private-use 34 | limitations: 35 | - no-liability 36 | - trademark-use 37 | --- 38 | European Union Public Licence 39 | V. 1.1 40 | 41 | 42 | EUPL © the European Community 2007 43 | 44 | 45 | This European Union Public Licence (the “EUPL”) applies to the 46 | Work or Software (as defined below) which is provided under the terms of this 47 | Licence. Any use of the Work, other than as authorised under this Licence is 48 | prohibited (to the extent such use is covered by a right of the copyright 49 | holder of the Work). 50 | 51 | The Original Work is provided under the terms of this 52 | Licence when the Licensor (as defined below) has placed the following notice 53 | immediately following the copyright notice for the Original Work: 54 | 55 | Licensed under the EUPL V.1.1 56 | 57 | or has expressed by any other mean his willingness to license under the EUPL. 58 | 59 | 60 | 1. Definitions 61 | 62 | In this Licence, the 63 | following terms have the following meaning: 64 | 65 | - The Licence: this Licence. 66 | 67 | - The Original Work or the Software: the software distributed 68 | and/or communicated by the Licensor under this Licence, available as Source 69 | Code and also as Executable Code as the case may be. 70 | 71 | - Derivative Works: 72 | the works or software that could be created by the Licensee, based upon the 73 | Original Work or modifications thereof. This Licence does not define the 74 | extent of modification or dependence on the Original Work required in order to 75 | classify a work as a Derivative Work; this extent is determined by copyright 76 | law applicable in the country mentioned in Article 15. 77 | 78 | - The Work: the Original Work and/or its Derivative Works. 79 | 80 | - The Source Code: the human-readable form of the Work which is the most 81 | convenient for people to study and modify. 82 | 83 | - The Executable Code: any code which has generally been compiled and which 84 | is meant to be interpreted by a computer as a program. 85 | 86 | - The Licensor: the natural or legal person that distributes and/or 87 | communicates the Work under the Licence. 88 | 89 | - Contributor(s): any natural or legal person who modifies the Work under the 90 | Licence, or otherwise contributes to the creation of a Derivative Work. 91 | 92 | - The Licensee or “You”: any natural or legal person who makes any usage of 93 | the Software under the terms of the Licence. 94 | 95 | - Distribution and/or Communication: any act of selling, giving, lending, 96 | renting, distributing, communicating, transmitting, or otherwise 97 | making available, on-line or off-line, copies of the Work or providing access 98 | to its essential functionalities at the disposal of any other natural or legal 99 | person. 100 | 101 | 102 | 2. Scope of the rights granted by the Licence 103 | 104 | The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, 105 | sub-licensable licence to do the following, for the duration of copyright 106 | vested in the Original Work: 107 | 108 | - use the Work in any circumstance and for all usage, 109 | - reproduce the Work, 110 | - modify the Original Work, and make Derivative Works 111 | based upon the Work, 112 | - communicate to the public, including the right to make available or display 113 | the Work or copies thereof to the public and perform publicly, as the case 114 | may be, the Work, 115 | - distribute the Work or copies thereof, 116 | - lend and rent the Work or copies thereof, 117 | - sub-license rights in the Work or copies thereof. 118 | 119 | Those rights can be exercised on any media, supports and formats, whether now 120 | known or later invented, as far as the applicable law permits so. 121 | 122 | In the countries where moral rights apply, the Licensor waives his right to 123 | exercise his moral right to the extent allowed by law in order to make 124 | effective the licence of the economic rights here above listed. 125 | 126 | The Licensor grants to the Licensee royalty-free, non exclusive usage rights 127 | to any patents held by the Licensor, to the extent necessary to make use of 128 | the rights granted on the Work under this Licence. 129 | 130 | 131 | 3. Communication of the Source Code 132 | 133 | The Licensor may provide the Work either 134 | in its Source Code form, or as Executable Code. If the Work is provided as 135 | Executable Code, the Licensor provides in addition a machine-readable copy of 136 | the Source Code of the Work along with each copy of the Work that the Licensor 137 | distributes or indicates, in a notice following the copyright notice attached 138 | to the Work, a repository where the Source Code is easily and freely 139 | accessible for as long as the Licensor continues to distribute and/or 140 | communicate the Work. 141 | 142 | 143 | 4. Limitations on copyright 144 | 145 | Nothing in this Licence is intended to deprive the Licensee of the benefits 146 | from any exception or limitation to the exclusive rights of the rights owners 147 | in the Original Work or Software, of the exhaustion of those rights or of 148 | other applicable limitations thereto. 149 | 150 | 151 | 5. Obligations of the Licensee 152 | 153 | The grant of the rights mentioned above is subject to some restrictions and 154 | obligations imposed on the Licensee. Those obligations are the following: 155 | 156 | Attribution right: 157 | the Licensee shall keep intact all copyright, patent or trademarks notices and 158 | all notices that refer to the Licence and to the disclaimer of warranties. The 159 | Licensee must include a copy of such notices and a copy of the Licence with 160 | every copy of the Work he/she distributes and/or communicates. The Licensee 161 | must cause any Derivative Work to carry prominent notices stating that the 162 | Work has been modified and the date of modification. 163 | 164 | Copyleft clause: 165 | If the Licensee distributes and/or communicates copies of the Original Works 166 | or Derivative Works based upon the Original Work, this Distribution and/or 167 | Communication will be done under the terms of this Licence or of a later 168 | version of this Licence unless the Original Work is expressly distributed only 169 | under this version of the Licence. The Licensee (becoming Licensor) cannot 170 | offer or impose any additional terms or conditions on the Work or Derivative 171 | Work that alter or restrict the terms of the Licence. 172 | 173 | Compatibility clause: 174 | If the Licensee Distributes and/or Communicates Derivative Works or copies 175 | thereof based upon both the Original Work and another work licensed under a 176 | Compatible Licence, this Distribution and/or Communication can be done under 177 | the terms of this Compatible Licence. For the sake of this clause, 178 | “Compatible Licence” refers to the licences listed in the appendix 179 | attached to this Licence. Should the Licensee’s obligations under the 180 | Compatible Licence conflict with his/her obligations under this Licence, the 181 | obligations of the Compatible Licence shall prevail. 182 | 183 | Provision of Source Code: 184 | When distributing and/or communicating copies of the Work, the Licensee 185 | will provide a machine-readable copy of the Source Code or indicate a 186 | repository where this Source will be easily and freely available for as long 187 | as the Licensee continues to distribute and/or communicate the Work. 188 | 189 | Legal Protection: 190 | This Licence does not grant permission to use the trade names, 191 | trademarks, service marks, or names of the Licensor, except as required for 192 | reasonable and customary use in describing the origin of the Work and 193 | reproducing the content of the copyright notice. 194 | 195 | 196 | 6. Chain of Authorship 197 | 198 | The original Licensor warrants that the copyright in the Original Work 199 | granted hereunder is owned by him/her or licensed to him/her and 200 | that he/she has the power and authority to grant the Licence. 201 | 202 | Each Contributor warrants that the copyright in the modifications he/she 203 | brings to the Work are owned by him/her or licensed to him/her and that 204 | he/she has the power and authority to grant the Licence. 205 | 206 | Each time You accept the Licence, the original Licensor and subsequent 207 | Contributors grant You a licence to their contributions to the Work, under 208 | the terms of this Licence. 209 | 210 | 211 | 7. Disclaimer of Warranty 212 | 213 | The Work is a work in progress, which is continuously improved by numerous 214 | contributors. It is not a finished work and may therefore contain defects or 215 | “bugs” inherent to this type of software development. 216 | 217 | For the above reason, the Work is provided under the Licence on an “as is” 218 | basis and without warranties of any kind concerning the Work, including 219 | without limitation merchantability, fitness for a particular purpose, absence 220 | of defects or errors, accuracy, non-infringement of intellectual property 221 | rights other than copyright as stated in Article 6 of this Licence. 222 | 223 | This disclaimer of warranty is an essential part of the Licence and a 224 | condition for the grant of any rights to the Work. 225 | 226 | 227 | 8. Disclaimer of Liability 228 | 229 | Except in the cases of wilful misconduct or damages directly caused to 230 | natural persons, the Licensor will in no event be liable for any direct or 231 | indirect, material or moral, damages of any kind, arising out of the Licence 232 | or of the use of the Work, including without limitation, 233 | damages for loss of goodwill, work stoppage, computer failure or malfunction, 234 | loss of data or any commercial damage, even if the Licensor has been advised 235 | of the possibility of such damage. However, the Licensor will be liable under 236 | statutory product liability laws as far such laws apply to the Work. 237 | 238 | 239 | 9. Additional agreements 240 | 241 | While distributing the Original Work or Derivative Works, You may choose 242 | to conclude an additional agreement to offer, and charge a fee for, 243 | acceptance of support, warranty, indemnity, or other liability 244 | obligations and/or services consistent with this Licence. However, in 245 | accepting such obligations, You may act only on your own behalf and on your 246 | sole responsibility, not on behalf of the original Licensor or any other 247 | Contributor, and only if You agree to indemnify, defend, and hold each 248 | Contributor harmless for any liability incurred by, or claims asserted against 249 | such Contributor by the fact You have accepted any such warranty or additional 250 | liability. 251 | 252 | 253 | 10. Acceptance of the Licence 254 | 255 | The provisions of this Licence can be accepted by clicking on 256 | an icon “I agree” placed under the bottom of a window displaying the text of 257 | this Licence or by affirming consent in any other similar way, in accordance 258 | with the rules of applicable law. Clicking on that icon indicates your clear 259 | and irrevocable acceptance of this Licence and 260 | all of its terms and conditions. 261 | 262 | Similarly, you irrevocably accept this Licence and 263 | all of its terms and conditions by exercising any rights granted to You 264 | by Article 2 of this Licence, such as the use of the Work, 265 | the creation by You of a Derivative Work or the Distribution and/or 266 | Communication by You of the Work or copies thereof. 267 | 268 | 269 | 11. Information to the public 270 | 271 | In case of any Distribution and/or Communication of the Work by means of 272 | electronic communication by You (for example, by offering to download 273 | the Work from a remote location) the distribution channel or media (for 274 | example, a website) must at least provide to the public the information 275 | requested by the applicable law regarding the Licensor, the Licence and the 276 | way it may be accessible, concluded, stored and reproduced by the 277 | Licensee. 278 | 279 | 280 | 12. Termination of the Licence 281 | 282 | The Licence and the rights granted hereunder will terminate automatically 283 | upon any breach by the Licensee of the terms of the Licence. 284 | 285 | Such a termination will not terminate the licences of any person who has 286 | received the Work from the Licensee under the Licence, provided such persons 287 | remain in full compliance with the Licence. 288 | 289 | 290 | 13. Miscellaneous 291 | 292 | Without prejudice of Article 9 above, the Licence represents the complete 293 | agreement between the Parties as to the Work licensed hereunder. 294 | 295 | If any provision of the Licence is invalid or unenforceable under applicable 296 | law, this will not affect the validity or enforceability of the Licence as a 297 | whole. Such provision will be construed and/or reformed so as necessary 298 | to make it valid and enforceable. 299 | 300 | The European Commission may publish other linguistic versions and/or new 301 | versions of this Licence, so far this is required and reasonable, without 302 | reducing the scope of the rights granted by the Licence. 303 | New versions of the Licence will be published with a unique version number. 304 | 305 | All linguistic versions of this Licence, approved by the European Commission, 306 | have identical value. Parties can take advantage of the linguistic version 307 | of their choice. 308 | 309 | 310 | 14. Jurisdiction 311 | 312 | Any litigation resulting from the interpretation of this License, arising 313 | between the European Commission, as a Licensor, and any Licensee, 314 | will be subject to the jurisdiction of the Court of Justice of the 315 | European Communities, as laid down in article 238 of the Treaty establishing 316 | the European Community. 317 | 318 | Any litigation arising between Parties, other than the European Commission, 319 | and resulting from the interpretation of this License, will be subject to the 320 | exclusive jurisdiction of the competent court where the Licensor resides or 321 | conducts its primary business. 322 | 323 | 324 | 15. Applicable Law 325 | 326 | This Licence shall be governed by the law of the European Union country where 327 | the Licensor resides or has his registered office. 328 | 329 | This licence shall be governed by the Belgian law if: 330 | 331 | - a litigation arises between the European Commission, as a Licensor, and any 332 | Licensee; 333 | - the Licensor, other than the European Commission, has no residence or 334 | registered office inside a European Union country. 335 | 336 | 337 | === 338 | 339 | 340 | Appendix 341 | 342 | 343 | “Compatible Licences” according to article 5 EUPL are: 344 | - GNU General Public License (GNU GPL) v. 2 345 | - Open Software License (OSL) v. 2.1, v. 3.0 346 | - Common Public License v. 1.0 347 | - Eclipse Public License v. 1.0 348 | - Cecill v. 2.0 349 | -------------------------------------------------------------------------------- /templates/gpl-2.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: GNU General Public License v2.0 6 | spdx-id: GPL-2.0 7 | nickname: GNU GPLv2 8 | redirect_from: /licenses/gpl-v2/ 9 | source: 'http://www.gnu.org/licenses/gpl-2.0.txt' 10 | description: >- 11 | The GNU GPL is the most widely used free software license and has a strong 12 | copyleft requirement. When distributing derived works, the source code of the 13 | work must be made available under the same license. There are multiple 14 | variants of the GNU GPL, each with different requirements. 15 | how: >- 16 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 17 | your source code and copy the text of the license into the file. 18 | note: >- 19 | The Free Software Foundation recommends taking the additional step of adding a 20 | boilerplate notice to the top of each file. The boilerplate can be found at 21 | the end of the license. 22 | using: 23 | - Linux: >- 24 | https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/COPYING 25 | - WordPress: 'https://github.com/WordPress/WordPress/blob/master/license.txt' 26 | conditions: 27 | - include-copyright 28 | - document-changes 29 | - disclose-source 30 | - same-license 31 | permissions: 32 | - commercial-use 33 | - modifications 34 | - distribution 35 | - private-use 36 | limitations: 37 | - no-liability 38 | --- 39 | GNU GENERAL PUBLIC LICENSE 40 | Version 2, June 1991 41 | 42 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 43 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 44 | Everyone is permitted to copy and distribute verbatim copies 45 | of this license document, but changing it is not allowed. 46 | 47 | Preamble 48 | 49 | The licenses for most software are designed to take away your 50 | freedom to share and change it. By contrast, the GNU General Public 51 | License is intended to guarantee your freedom to share and change free 52 | software--to make sure the software is free for all its users. This 53 | General Public License applies to most of the Free Software 54 | Foundation's software and to any other program whose authors commit to 55 | using it. (Some other Free Software Foundation software is covered by 56 | the GNU Lesser General Public License instead.) You can apply it to 57 | your programs, too. 58 | 59 | When we speak of free software, we are referring to freedom, not 60 | price. Our General Public Licenses are designed to make sure that you 61 | have the freedom to distribute copies of free software (and charge for 62 | this service if you wish), that you receive source code or can get it 63 | if you want it, that you can change the software or use pieces of it 64 | in new free programs; and that you know you can do these things. 65 | 66 | To protect your rights, we need to make restrictions that forbid 67 | anyone to deny you these rights or to ask you to surrender the rights. 68 | These restrictions translate to certain responsibilities for you if you 69 | distribute copies of the software, or if you modify it. 70 | 71 | For example, if you distribute copies of such a program, whether 72 | gratis or for a fee, you must give the recipients all the rights that 73 | you have. You must make sure that they, too, receive or can get the 74 | source code. And you must show them these terms so they know their 75 | rights. 76 | 77 | We protect your rights with two steps: (1) copyright the software, and 78 | (2) offer you this license which gives you legal permission to copy, 79 | distribute and/or modify the software. 80 | 81 | Also, for each author's protection and ours, we want to make certain 82 | that everyone understands that there is no warranty for this free 83 | software. If the software is modified by someone else and passed on, we 84 | want its recipients to know that what they have is not the original, so 85 | that any problems introduced by others will not reflect on the original 86 | authors' reputations. 87 | 88 | Finally, any free program is threatened constantly by software 89 | patents. We wish to avoid the danger that redistributors of a free 90 | program will individually obtain patent licenses, in effect making the 91 | program proprietary. To prevent this, we have made it clear that any 92 | patent must be licensed for everyone's free use or not licensed at all. 93 | 94 | The precise terms and conditions for copying, distribution and 95 | modification follow. 96 | 97 | GNU GENERAL PUBLIC LICENSE 98 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 99 | 100 | 0. This License applies to any program or other work which contains 101 | a notice placed by the copyright holder saying it may be distributed 102 | under the terms of this General Public License. The "Program", below, 103 | refers to any such program or work, and a "work based on the Program" 104 | means either the Program or any derivative work under copyright law: 105 | that is to say, a work containing the Program or a portion of it, 106 | either verbatim or with modifications and/or translated into another 107 | language. (Hereinafter, translation is included without limitation in 108 | the term "modification".) Each licensee is addressed as "you". 109 | 110 | Activities other than copying, distribution and modification are not 111 | covered by this License; they are outside its scope. The act of 112 | running the Program is not restricted, and the output from the Program 113 | is covered only if its contents constitute a work based on the 114 | Program (independent of having been made by running the Program). 115 | Whether that is true depends on what the Program does. 116 | 117 | 1. You may copy and distribute verbatim copies of the Program's 118 | source code as you receive it, in any medium, provided that you 119 | conspicuously and appropriately publish on each copy an appropriate 120 | copyright notice and disclaimer of warranty; keep intact all the 121 | notices that refer to this License and to the absence of any warranty; 122 | and give any other recipients of the Program a copy of this License 123 | along with the Program. 124 | 125 | You may charge a fee for the physical act of transferring a copy, and 126 | you may at your option offer warranty protection in exchange for a fee. 127 | 128 | 2. You may modify your copy or copies of the Program or any portion 129 | of it, thus forming a work based on the Program, and copy and 130 | distribute such modifications or work under the terms of Section 1 131 | above, provided that you also meet all of these conditions: 132 | 133 | a) You must cause the modified files to carry prominent notices 134 | stating that you changed the files and the date of any change. 135 | 136 | b) You must cause any work that you distribute or publish, that in 137 | whole or in part contains or is derived from the Program or any 138 | part thereof, to be licensed as a whole at no charge to all third 139 | parties under the terms of this License. 140 | 141 | c) If the modified program normally reads commands interactively 142 | when run, you must cause it, when started running for such 143 | interactive use in the most ordinary way, to print or display an 144 | announcement including an appropriate copyright notice and a 145 | notice that there is no warranty (or else, saying that you provide 146 | a warranty) and that users may redistribute the program under 147 | these conditions, and telling the user how to view a copy of this 148 | License. (Exception: if the Program itself is interactive but 149 | does not normally print such an announcement, your work based on 150 | the Program is not required to print an announcement.) 151 | 152 | These requirements apply to the modified work as a whole. If 153 | identifiable sections of that work are not derived from the Program, 154 | and can be reasonably considered independent and separate works in 155 | themselves, then this License, and its terms, do not apply to those 156 | sections when you distribute them as separate works. But when you 157 | distribute the same sections as part of a whole which is a work based 158 | on the Program, the distribution of the whole must be on the terms of 159 | this License, whose permissions for other licensees extend to the 160 | entire whole, and thus to each and every part regardless of who wrote it. 161 | 162 | Thus, it is not the intent of this section to claim rights or contest 163 | your rights to work written entirely by you; rather, the intent is to 164 | exercise the right to control the distribution of derivative or 165 | collective works based on the Program. 166 | 167 | In addition, mere aggregation of another work not based on the Program 168 | with the Program (or with a work based on the Program) on a volume of 169 | a storage or distribution medium does not bring the other work under 170 | the scope of this License. 171 | 172 | 3. You may copy and distribute the Program (or a work based on it, 173 | under Section 2) in object code or executable form under the terms of 174 | Sections 1 and 2 above provided that you also do one of the following: 175 | 176 | a) Accompany it with the complete corresponding machine-readable 177 | source code, which must be distributed under the terms of Sections 178 | 1 and 2 above on a medium customarily used for software interchange; or, 179 | 180 | b) Accompany it with a written offer, valid for at least three 181 | years, to give any third party, for a charge no more than your 182 | cost of physically performing source distribution, a complete 183 | machine-readable copy of the corresponding source code, to be 184 | distributed under the terms of Sections 1 and 2 above on a medium 185 | customarily used for software interchange; or, 186 | 187 | c) Accompany it with the information you received as to the offer 188 | to distribute corresponding source code. (This alternative is 189 | allowed only for noncommercial distribution and only if you 190 | received the program in object code or executable form with such 191 | an offer, in accord with Subsection b above.) 192 | 193 | The source code for a work means the preferred form of the work for 194 | making modifications to it. For an executable work, complete source 195 | code means all the source code for all modules it contains, plus any 196 | associated interface definition files, plus the scripts used to 197 | control compilation and installation of the executable. However, as a 198 | special exception, the source code distributed need not include 199 | anything that is normally distributed (in either source or binary 200 | form) with the major components (compiler, kernel, and so on) of the 201 | operating system on which the executable runs, unless that component 202 | itself accompanies the executable. 203 | 204 | If distribution of executable or object code is made by offering 205 | access to copy from a designated place, then offering equivalent 206 | access to copy the source code from the same place counts as 207 | distribution of the source code, even though third parties are not 208 | compelled to copy the source along with the object code. 209 | 210 | 4. You may not copy, modify, sublicense, or distribute the Program 211 | except as expressly provided under this License. Any attempt 212 | otherwise to copy, modify, sublicense or distribute the Program is 213 | void, and will automatically terminate your rights under this License. 214 | However, parties who have received copies, or rights, from you under 215 | this License will not have their licenses terminated so long as such 216 | parties remain in full compliance. 217 | 218 | 5. You are not required to accept this License, since you have not 219 | signed it. However, nothing else grants you permission to modify or 220 | distribute the Program or its derivative works. These actions are 221 | prohibited by law if you do not accept this License. Therefore, by 222 | modifying or distributing the Program (or any work based on the 223 | Program), you indicate your acceptance of this License to do so, and 224 | all its terms and conditions for copying, distributing or modifying 225 | the Program or works based on it. 226 | 227 | 6. Each time you redistribute the Program (or any work based on the 228 | Program), the recipient automatically receives a license from the 229 | original licensor to copy, distribute or modify the Program subject to 230 | these terms and conditions. You may not impose any further 231 | restrictions on the recipients' exercise of the rights granted herein. 232 | You are not responsible for enforcing compliance by third parties to 233 | this License. 234 | 235 | 7. If, as a consequence of a court judgment or allegation of patent 236 | infringement or for any other reason (not limited to patent issues), 237 | conditions are imposed on you (whether by court order, agreement or 238 | otherwise) that contradict the conditions of this License, they do not 239 | excuse you from the conditions of this License. If you cannot 240 | distribute so as to satisfy simultaneously your obligations under this 241 | License and any other pertinent obligations, then as a consequence you 242 | may not distribute the Program at all. For example, if a patent 243 | license would not permit royalty-free redistribution of the Program by 244 | all those who receive copies directly or indirectly through you, then 245 | the only way you could satisfy both it and this License would be to 246 | refrain entirely from distribution of the Program. 247 | 248 | If any portion of this section is held invalid or unenforceable under 249 | any particular circumstance, the balance of the section is intended to 250 | apply and the section as a whole is intended to apply in other 251 | circumstances. 252 | 253 | It is not the purpose of this section to induce you to infringe any 254 | patents or other property right claims or to contest validity of any 255 | such claims; this section has the sole purpose of protecting the 256 | integrity of the free software distribution system, which is 257 | implemented by public license practices. Many people have made 258 | generous contributions to the wide range of software distributed 259 | through that system in reliance on consistent application of that 260 | system; it is up to the author/donor to decide if he or she is willing 261 | to distribute software through any other system and a licensee cannot 262 | impose that choice. 263 | 264 | This section is intended to make thoroughly clear what is believed to 265 | be a consequence of the rest of this License. 266 | 267 | 8. If the distribution and/or use of the Program is restricted in 268 | certain countries either by patents or by copyrighted interfaces, the 269 | original copyright holder who places the Program under this License 270 | may add an explicit geographical distribution limitation excluding 271 | those countries, so that distribution is permitted only in or among 272 | countries not thus excluded. In such case, this License incorporates 273 | the limitation as if written in the body of this License. 274 | 275 | 9. The Free Software Foundation may publish revised and/or new versions 276 | of the General Public License from time to time. Such new versions will 277 | be similar in spirit to the present version, but may differ in detail to 278 | address new problems or concerns. 279 | 280 | Each version is given a distinguishing version number. If the Program 281 | specifies a version number of this License which applies to it and "any 282 | later version", you have the option of following the terms and conditions 283 | either of that version or of any later version published by the Free 284 | Software Foundation. If the Program does not specify a version number of 285 | this License, you may choose any version ever published by the Free Software 286 | Foundation. 287 | 288 | 10. If you wish to incorporate parts of the Program into other free 289 | programs whose distribution conditions are different, write to the author 290 | to ask for permission. For software which is copyrighted by the Free 291 | Software Foundation, write to the Free Software Foundation; we sometimes 292 | make exceptions for this. Our decision will be guided by the two goals 293 | of preserving the free status of all derivatives of our free software and 294 | of promoting the sharing and reuse of software generally. 295 | 296 | NO WARRANTY 297 | 298 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 299 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 300 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 301 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 302 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 303 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 304 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 305 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 306 | REPAIR OR CORRECTION. 307 | 308 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 309 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 310 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 311 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 312 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 313 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 314 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 315 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 316 | POSSIBILITY OF SUCH DAMAGES. 317 | 318 | END OF TERMS AND CONDITIONS 319 | 320 | How to Apply These Terms to Your New Programs 321 | 322 | If you develop a new program, and you want it to be of the greatest 323 | possible use to the public, the best way to achieve this is to make it 324 | free software which everyone can redistribute and change under these terms. 325 | 326 | To do so, attach the following notices to the program. It is safest 327 | to attach them to the start of each source file to most effectively 328 | convey the exclusion of warranty; and each file should have at least 329 | the "copyright" line and a pointer to where the full notice is found. 330 | 331 | {description} 332 | Copyright (C) {year} {fullname} 333 | 334 | This program is free software; you can redistribute it and/or modify 335 | it under the terms of the GNU General Public License as published by 336 | the Free Software Foundation; either version 2 of the License, or 337 | (at your option) any later version. 338 | 339 | This program is distributed in the hope that it will be useful, 340 | but WITHOUT ANY WARRANTY; without even the implied warranty of 341 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 342 | GNU General Public License for more details. 343 | 344 | You should have received a copy of the GNU General Public License along 345 | with this program; if not, write to the Free Software Foundation, Inc., 346 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 347 | 348 | Also add information on how to contact you by electronic and paper mail. 349 | 350 | If the program is interactive, make it output a short notice like this 351 | when it starts in an interactive mode: 352 | 353 | Gnomovision version 69, Copyright (C) year name of author 354 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 355 | This is free software, and you are welcome to redistribute it 356 | under certain conditions; type `show c' for details. 357 | 358 | The hypothetical commands `show w' and `show c' should show the appropriate 359 | parts of the General Public License. Of course, the commands you use may 360 | be called something other than `show w' and `show c'; they could even be 361 | mouse-clicks or menu items--whatever suits your program. 362 | 363 | You should also get your employer (if you work as a programmer) or your 364 | school, if any, to sign a "copyright disclaimer" for the program, if 365 | necessary. Here is a sample; alter the names: 366 | 367 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 368 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 369 | 370 | {signature of Ty Coon}, 1 April 1989 371 | Ty Coon, President of Vice 372 | 373 | This General Public License does not permit incorporating your program into 374 | proprietary programs. If your program is a subroutine library, you may 375 | consider it more useful to permit linking proprietary applications with the 376 | library. If this is what you want to do, use the GNU Lesser General 377 | Public License instead of this License. 378 | -------------------------------------------------------------------------------- /templates/isc.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: ISC License 6 | spdx-id: ISC 7 | source: 'http://opensource.org/licenses/isc-license' 8 | description: >- 9 | A permissive license lets people do anything with your code with proper 10 | attribution and without warranty. The ISC license is functionally equivalent 11 | to the BSD 2-Clause and MIT licenses, removing some language that is no 13 | longer necessary. 14 | how: >- 15 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 16 | your source code and copy the text of the license into the file. Replace 17 | [year] with the current year and [fullname] with the name (or names) of the 18 | copyright holders. 19 | using: 20 | - documentation.js: 'https://github.com/documentationjs/documentation/blob/master/LICENSE' 21 | - Node.js semver: 'https://github.com/npm/node-semver/blob/master/LICENSE' 22 | - OpenStreetMap iD: 'https://github.com/openstreetmap/iD/blob/master/LICENSE' 23 | conditions: 24 | - include-copyright 25 | permissions: 26 | - commercial-use 27 | - distribution 28 | - modifications 29 | - private-use 30 | limitations: 31 | - no-liability 32 | --- 33 | ISC License 34 | 35 | Copyright (c) <%= year %>, <%= ask("author.name", "Author's full name?") %> 36 | 37 | Permission to use, copy, modify, and/or distribute this software for any 38 | purpose with or without fee is hereby granted, provided that the above 39 | copyright notice and this permission notice appear in all copies. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 42 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 43 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 44 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 45 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 46 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 47 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 48 | -------------------------------------------------------------------------------- /templates/lgpl-3.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: 3 | - gpl-3.0 4 | rename: 5 | basename: LICENSE.lesser 6 | title: GNU Lesser General Public License v3.0 7 | spdx-id: LGPL-3.0 8 | nickname: GNU LGPLv3 9 | redirect_from: /licenses/lgpl-v3/ 10 | source: 'http://www.gnu.org/licenses/lgpl-3.0.txt' 11 | hidden: false 12 | description: >- 13 | Permissions of this copyleft license are conditioned on making available 14 | complete source code of licensed works and modifications under the same 15 | license or the GNU GPLv3. Copyright and license notices must be preserved. 16 | Contributors provide an express grant of patent rights. However, a larger work 17 | using the licensed work through interfaces provided by the licensed work may 18 | be distributed under different terms and without source code for the larger 19 | work. 20 | how: >- 21 | This license is an additional set of permissions to the GNU GPLv3 license. Follow the instructions to 23 | apply the GNU GPLv3. Then either paste this text to the bottom of the created 24 | file OR add a separate file (typically named COPYING.lesser or LICENSE.lesser) 25 | in the root of your source code and copy the text. 26 | note: >- 27 | The Free Software Foundation recommends taking the additional step of adding a 28 | boilerplate notice to the top of each file. The boilerplate can be found at 29 | the end of the GNU GPLv3 license. Insert the 30 | word “Lesser” before “General” in all three places in the boilerplate notice 31 | to make sure that you refer to the GNU LGPLv3 and not the GNU GPLv3. 32 | conditions: 33 | - include-copyright 34 | - disclose-source 35 | - document-changes 36 | - same-license 37 | permissions: 38 | - commercial-use 39 | - modifications 40 | - distribution 41 | - patent-use 42 | - private-use 43 | limitations: 44 | - no-liability 45 | extra: > 46 | 47 | This will also generate a GNU General Public License v3.0 `LICENSE` * file in 48 | the current working directory. 49 | --- 50 | GNU LESSER GENERAL PUBLIC LICENSE 51 | Version 3, 29 June 2007 52 | 53 | Copyright (C) 2007 Free Software Foundation, Inc. 54 | Everyone is permitted to copy and distribute verbatim copies 55 | of this license document, but changing it is not allowed. 56 | 57 | 58 | This version of the GNU Lesser General Public License incorporates 59 | the terms and conditions of version 3 of the GNU General Public 60 | License, supplemented by the additional permissions listed below. 61 | 62 | 0. Additional Definitions. 63 | 64 | As used herein, "this License" refers to version 3 of the GNU Lesser 65 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 66 | General Public License. 67 | 68 | "The Library" refers to a covered work governed by this License, 69 | other than an Application or a Combined Work as defined below. 70 | 71 | An "Application" is any work that makes use of an interface provided 72 | by the Library, but which is not otherwise based on the Library. 73 | Defining a subclass of a class defined by the Library is deemed a mode 74 | of using an interface provided by the Library. 75 | 76 | A "Combined Work" is a work produced by combining or linking an 77 | Application with the Library. The particular version of the Library 78 | with which the Combined Work was made is also called the "Linked 79 | Version". 80 | 81 | The "Minimal Corresponding Source" for a Combined Work means the 82 | Corresponding Source for the Combined Work, excluding any source code 83 | for portions of the Combined Work that, considered in isolation, are 84 | based on the Application, and not on the Linked Version. 85 | 86 | The "Corresponding Application Code" for a Combined Work means the 87 | object code and/or source code for the Application, including any data 88 | and utility programs needed for reproducing the Combined Work from the 89 | Application, but excluding the System Libraries of the Combined Work. 90 | 91 | 1. Exception to Section 3 of the GNU GPL. 92 | 93 | You may convey a covered work under sections 3 and 4 of this License 94 | without being bound by section 3 of the GNU GPL. 95 | 96 | 2. Conveying Modified Versions. 97 | 98 | If you modify a copy of the Library, and, in your modifications, a 99 | facility refers to a function or data to be supplied by an Application 100 | that uses the facility (other than as an argument passed when the 101 | facility is invoked), then you may convey a copy of the modified 102 | version: 103 | 104 | a) under this License, provided that you make a good faith effort to 105 | ensure that, in the event an Application does not supply the 106 | function or data, the facility still operates, and performs 107 | whatever part of its purpose remains meaningful, or 108 | 109 | b) under the GNU GPL, with none of the additional permissions of 110 | this License applicable to that copy. 111 | 112 | 3. Object Code Incorporating Material from Library Header Files. 113 | 114 | The object code form of an Application may incorporate material from 115 | a header file that is part of the Library. You may convey such object 116 | code under terms of your choice, provided that, if the incorporated 117 | material is not limited to numerical parameters, data structure 118 | layouts and accessors, or small macros, inline functions and templates 119 | (ten or fewer lines in length), you do both of the following: 120 | 121 | a) Give prominent notice with each copy of the object code that the 122 | Library is used in it and that the Library and its use are 123 | covered by this License. 124 | 125 | b) Accompany the object code with a copy of the GNU GPL and this license 126 | document. 127 | 128 | 4. Combined Works. 129 | 130 | You may convey a Combined Work under terms of your choice that, 131 | taken together, effectively do not restrict modification of the 132 | portions of the Library contained in the Combined Work and reverse 133 | engineering for debugging such modifications, if you also do each of 134 | the following: 135 | 136 | a) Give prominent notice with each copy of the Combined Work that 137 | the Library is used in it and that the Library and its use are 138 | covered by this License. 139 | 140 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 141 | document. 142 | 143 | c) For a Combined Work that displays copyright notices during 144 | execution, include the copyright notice for the Library among 145 | these notices, as well as a reference directing the user to the 146 | copies of the GNU GPL and this license document. 147 | 148 | d) Do one of the following: 149 | 150 | 0) Convey the Minimal Corresponding Source under the terms of this 151 | License, and the Corresponding Application Code in a form 152 | suitable for, and under terms that permit, the user to 153 | recombine or relink the Application with a modified version of 154 | the Linked Version to produce a modified Combined Work, in the 155 | manner specified by section 6 of the GNU GPL for conveying 156 | Corresponding Source. 157 | 158 | 1) Use a suitable shared library mechanism for linking with the 159 | Library. A suitable mechanism is one that (a) uses at run time 160 | a copy of the Library already present on the user's computer 161 | system, and (b) will operate properly with a modified version 162 | of the Library that is interface-compatible with the Linked 163 | Version. 164 | 165 | e) Provide Installation Information, but only if you would otherwise 166 | be required to provide such information under section 6 of the 167 | GNU GPL, and only to the extent that such information is 168 | necessary to install and execute a modified version of the 169 | Combined Work produced by recombining or relinking the 170 | Application with a modified version of the Linked Version. (If 171 | you use option 4d0, the Installation Information must accompany 172 | the Minimal Corresponding Source and Corresponding Application 173 | Code. If you use option 4d1, you must provide the Installation 174 | Information in the manner specified by section 6 of the GNU GPL 175 | for conveying Corresponding Source.) 176 | 177 | 5. Combined Libraries. 178 | 179 | You may place library facilities that are a work based on the 180 | Library side by side in a single library together with other library 181 | facilities that are not Applications and are not covered by this 182 | License, and convey such a combined library under terms of your 183 | choice, if you do both of the following: 184 | 185 | a) Accompany the combined library with a copy of the same work based 186 | on the Library, uncombined with any other library facilities, 187 | conveyed under the terms of this License. 188 | 189 | b) Give prominent notice with the combined library that part of it 190 | is a work based on the Library, and explaining where to find the 191 | accompanying uncombined form of the same work. 192 | 193 | 6. Revised Versions of the GNU Lesser General Public License. 194 | 195 | The Free Software Foundation may publish revised and/or new versions 196 | of the GNU Lesser General Public License from time to time. Such new 197 | versions will be similar in spirit to the present version, but may 198 | differ in detail to address new problems or concerns. 199 | 200 | Each version is given a distinguishing version number. If the 201 | Library as you received it specifies that a certain numbered version 202 | of the GNU Lesser General Public License "or any later version" 203 | applies to it, you have the option of following the terms and 204 | conditions either of that published version or of any later version 205 | published by the Free Software Foundation. If the Library as you 206 | received it does not specify a version number of the GNU Lesser 207 | General Public License, you may choose any version of the GNU Lesser 208 | General Public License ever published by the Free Software Foundation. 209 | 210 | If the Library as you received it specifies that a proxy can decide 211 | whether future versions of the GNU Lesser General Public License shall 212 | apply, that proxy's public statement of acceptance of any version is 213 | permanent authorization for you to choose that version for the 214 | Library. 215 | -------------------------------------------------------------------------------- /templates/mit.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: MIT License 6 | spdx-id: MIT 7 | source: 'https://opensource.org/licenses/MIT' 8 | featured: true 9 | hidden: false 10 | description: >- 11 | A short and simple permissive license with conditions only requiring 12 | preservation of copyright and license notices. Licensed works, modifications, 13 | and larger works may be distributed under different terms and without source 14 | code. 15 | how: >- 16 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 17 | your source code and copy the text of the license into the file. Replace 18 | [year] with the current year and [fullname] with the name (or names) of the 19 | copyright holders. 20 | using: 21 | - jQuery: 'https://github.com/jquery/jquery/blob/master/LICENSE.txt' 22 | - .NET Core: 'https://github.com/dotnet/corefx/blob/master/LICENSE' 23 | - Rails: 'https://github.com/rails/rails/blob/master/activerecord/MIT-LICENSE' 24 | conditions: 25 | - include-copyright 26 | permissions: 27 | - commercial-use 28 | - modifications 29 | - distribution 30 | - private-use 31 | limitations: 32 | - no-liability 33 | --- 34 | The MIT License (MIT) 35 | 36 | Copyright (c) <%= year %> <%= ask("author.name") %> 37 | 38 | Permission is hereby granted, free of charge, to any person obtaining a copy 39 | of this software and associated documentation files (the "Software"), to deal 40 | in the Software without restriction, including without limitation the rights 41 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 42 | copies of the Software, and to permit persons to whom the Software is 43 | furnished to do so, subject to the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be included in all 46 | copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 54 | SOFTWARE. 55 | -------------------------------------------------------------------------------- /templates/mpl-2.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Mozilla Public License 2.0 6 | spdx-id: MPL-2.0 7 | redirect_from: /licenses/mozilla/ 8 | source: 'https://www.mozilla.org/media/MPL/2.0/index.txt' 9 | hidden: false 10 | description: >- 11 | Permissions of this weak copyleft license are conditioned on making available 12 | source code of licensed files and modifications of those files under the same 13 | license (or in certain cases, one of the GNU licenses). Copyright and license 14 | notices must be preserved. Contributors provide an express grant of patent 15 | rights. However, a larger work using the licensed work may be distributed 16 | under different terms and without source code for files added in the larger 17 | work. 18 | how: >- 19 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 20 | your source code and copy the text of the license into the file. 21 | note: >- 22 | The Mozilla Foundation recommends taking the additional step of adding a 23 | boilerplate notice to the top of each file. The boilerplate can be found at 24 | the end of the license (Exhibit A). 25 | using: 26 | - Servo: 'https://github.com/servo/servo/blob/master/LICENSE' 27 | - TimelineJS3: 'https://github.com/NUKnightLab/TimelineJS3/blob/master/LICENSE' 28 | - LibreOffice: 'https://cgit.freedesktop.org/libreoffice/core/tree/COPYING.MPL' 29 | conditions: 30 | - disclose-source 31 | - include-copyright 32 | - same-license 33 | permissions: 34 | - commercial-use 35 | - modifications 36 | - distribution 37 | - patent-use 38 | - private-use 39 | limitations: 40 | - no-liability 41 | - trademark-use 42 | --- 43 | Mozilla Public License Version 2.0 44 | ================================== 45 | 46 | 1. Definitions 47 | -------------- 48 | 49 | 1.1. "Contributor" 50 | means each individual or legal entity that creates, contributes to 51 | the creation of, or owns Covered Software. 52 | 53 | 1.2. "Contributor Version" 54 | means the combination of the Contributions of others (if any) used 55 | by a Contributor and that particular Contributor's Contribution. 56 | 57 | 1.3. "Contribution" 58 | means Covered Software of a particular Contributor. 59 | 60 | 1.4. "Covered Software" 61 | means Source Code Form to which the initial Contributor has attached 62 | the notice in Exhibit A, the Executable Form of such Source Code 63 | Form, and Modifications of such Source Code Form, in each case 64 | including portions thereof. 65 | 66 | 1.5. "Incompatible With Secondary Licenses" 67 | means 68 | 69 | (a) that the initial Contributor has attached the notice described 70 | in Exhibit B to the Covered Software; or 71 | 72 | (b) that the Covered Software was made available under the terms of 73 | version 1.1 or earlier of the License, but not also under the 74 | terms of a Secondary License. 75 | 76 | 1.6. "Executable Form" 77 | means any form of the work other than Source Code Form. 78 | 79 | 1.7. "Larger Work" 80 | means a work that combines Covered Software with other material, in 81 | a separate file or files, that is not Covered Software. 82 | 83 | 1.8. "License" 84 | means this document. 85 | 86 | 1.9. "Licensable" 87 | means having the right to grant, to the maximum extent possible, 88 | whether at the time of the initial grant or subsequently, any and 89 | all of the rights conveyed by this License. 90 | 91 | 1.10. "Modifications" 92 | means any of the following: 93 | 94 | (a) any file in Source Code Form that results from an addition to, 95 | deletion from, or modification of the contents of Covered 96 | Software; or 97 | 98 | (b) any new file in Source Code Form that contains any Covered 99 | Software. 100 | 101 | 1.11. "Patent Claims" of a Contributor 102 | means any patent claim(s), including without limitation, method, 103 | process, and apparatus claims, in any patent Licensable by such 104 | Contributor that would be infringed, but for the grant of the 105 | License, by the making, using, selling, offering for sale, having 106 | made, import, or transfer of either its Contributions or its 107 | Contributor Version. 108 | 109 | 1.12. "Secondary License" 110 | means either the GNU General Public License, Version 2.0, the GNU 111 | Lesser General Public License, Version 2.1, the GNU Affero General 112 | Public License, Version 3.0, or any later versions of those 113 | licenses. 114 | 115 | 1.13. "Source Code Form" 116 | means the form of the work preferred for making modifications. 117 | 118 | 1.14. "You" (or "Your") 119 | means an individual or a legal entity exercising rights under this 120 | License. For legal entities, "You" includes any entity that 121 | controls, is controlled by, or is under common control with You. For 122 | purposes of this definition, "control" means (a) the power, direct 123 | or indirect, to cause the direction or management of such entity, 124 | whether by contract or otherwise, or (b) ownership of more than 125 | fifty percent (50%) of the outstanding shares or beneficial 126 | ownership of such entity. 127 | 128 | 2. License Grants and Conditions 129 | -------------------------------- 130 | 131 | 2.1. Grants 132 | 133 | Each Contributor hereby grants You a world-wide, royalty-free, 134 | non-exclusive license: 135 | 136 | (a) under intellectual property rights (other than patent or trademark) 137 | Licensable by such Contributor to use, reproduce, make available, 138 | modify, display, perform, distribute, and otherwise exploit its 139 | Contributions, either on an unmodified basis, with Modifications, or 140 | as part of a Larger Work; and 141 | 142 | (b) under Patent Claims of such Contributor to make, use, sell, offer 143 | for sale, have made, import, and otherwise transfer either its 144 | Contributions or its Contributor Version. 145 | 146 | 2.2. Effective Date 147 | 148 | The licenses granted in Section 2.1 with respect to any Contribution 149 | become effective for each Contribution on the date the Contributor first 150 | distributes such Contribution. 151 | 152 | 2.3. Limitations on Grant Scope 153 | 154 | The licenses granted in this Section 2 are the only rights granted under 155 | this License. No additional rights or licenses will be implied from the 156 | distribution or licensing of Covered Software under this License. 157 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 158 | Contributor: 159 | 160 | (a) for any code that a Contributor has removed from Covered Software; 161 | or 162 | 163 | (b) for infringements caused by: (i) Your and any other third party's 164 | modifications of Covered Software, or (ii) the combination of its 165 | Contributions with other software (except as part of its Contributor 166 | Version); or 167 | 168 | (c) under Patent Claims infringed by Covered Software in the absence of 169 | its Contributions. 170 | 171 | This License does not grant any rights in the trademarks, service marks, 172 | or logos of any Contributor (except as may be necessary to comply with 173 | the notice requirements in Section 3.4). 174 | 175 | 2.4. Subsequent Licenses 176 | 177 | No Contributor makes additional grants as a result of Your choice to 178 | distribute the Covered Software under a subsequent version of this 179 | License (see Section 10.2) or under the terms of a Secondary License (if 180 | permitted under the terms of Section 3.3). 181 | 182 | 2.5. Representation 183 | 184 | Each Contributor represents that the Contributor believes its 185 | Contributions are its original creation(s) or it has sufficient rights 186 | to grant the rights to its Contributions conveyed by this License. 187 | 188 | 2.6. Fair Use 189 | 190 | This License is not intended to limit any rights You have under 191 | applicable copyright doctrines of fair use, fair dealing, or other 192 | equivalents. 193 | 194 | 2.7. Conditions 195 | 196 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 197 | in Section 2.1. 198 | 199 | 3. Responsibilities 200 | ------------------- 201 | 202 | 3.1. Distribution of Source Form 203 | 204 | All distribution of Covered Software in Source Code Form, including any 205 | Modifications that You create or to which You contribute, must be under 206 | the terms of this License. You must inform recipients that the Source 207 | Code Form of the Covered Software is governed by the terms of this 208 | License, and how they can obtain a copy of this License. You may not 209 | attempt to alter or restrict the recipients' rights in the Source Code 210 | Form. 211 | 212 | 3.2. Distribution of Executable Form 213 | 214 | If You distribute Covered Software in Executable Form then: 215 | 216 | (a) such Covered Software must also be made available in Source Code 217 | Form, as described in Section 3.1, and You must inform recipients of 218 | the Executable Form how they can obtain a copy of such Source Code 219 | Form by reasonable means in a timely manner, at a charge no more 220 | than the cost of distribution to the recipient; and 221 | 222 | (b) You may distribute such Executable Form under the terms of this 223 | License, or sublicense it under different terms, provided that the 224 | license for the Executable Form does not attempt to limit or alter 225 | the recipients' rights in the Source Code Form under this License. 226 | 227 | 3.3. Distribution of a Larger Work 228 | 229 | You may create and distribute a Larger Work under terms of Your choice, 230 | provided that You also comply with the requirements of this License for 231 | the Covered Software. If the Larger Work is a combination of Covered 232 | Software with a work governed by one or more Secondary Licenses, and the 233 | Covered Software is not Incompatible With Secondary Licenses, this 234 | License permits You to additionally distribute such Covered Software 235 | under the terms of such Secondary License(s), so that the recipient of 236 | the Larger Work may, at their option, further distribute the Covered 237 | Software under the terms of either this License or such Secondary 238 | License(s). 239 | 240 | 3.4. Notices 241 | 242 | You may not remove or alter the substance of any license notices 243 | (including copyright notices, patent notices, disclaimers of warranty, 244 | or limitations of liability) contained within the Source Code Form of 245 | the Covered Software, except that You may alter any license notices to 246 | the extent required to remedy known factual inaccuracies. 247 | 248 | 3.5. Application of Additional Terms 249 | 250 | You may choose to offer, and to charge a fee for, warranty, support, 251 | indemnity or liability obligations to one or more recipients of Covered 252 | Software. However, You may do so only on Your own behalf, and not on 253 | behalf of any Contributor. You must make it absolutely clear that any 254 | such warranty, support, indemnity, or liability obligation is offered by 255 | You alone, and You hereby agree to indemnify every Contributor for any 256 | liability incurred by such Contributor as a result of warranty, support, 257 | indemnity or liability terms You offer. You may include additional 258 | disclaimers of warranty and limitations of liability specific to any 259 | jurisdiction. 260 | 261 | 4. Inability to Comply Due to Statute or Regulation 262 | --------------------------------------------------- 263 | 264 | If it is impossible for You to comply with any of the terms of this 265 | License with respect to some or all of the Covered Software due to 266 | statute, judicial order, or regulation then You must: (a) comply with 267 | the terms of this License to the maximum extent possible; and (b) 268 | describe the limitations and the code they affect. Such description must 269 | be placed in a text file included with all distributions of the Covered 270 | Software under this License. Except to the extent prohibited by statute 271 | or regulation, such description must be sufficiently detailed for a 272 | recipient of ordinary skill to be able to understand it. 273 | 274 | 5. Termination 275 | -------------- 276 | 277 | 5.1. The rights granted under this License will terminate automatically 278 | if You fail to comply with any of its terms. However, if You become 279 | compliant, then the rights granted under this License from a particular 280 | Contributor are reinstated (a) provisionally, unless and until such 281 | Contributor explicitly and finally terminates Your grants, and (b) on an 282 | ongoing basis, if such Contributor fails to notify You of the 283 | non-compliance by some reasonable means prior to 60 days after You have 284 | come back into compliance. Moreover, Your grants from a particular 285 | Contributor are reinstated on an ongoing basis if such Contributor 286 | notifies You of the non-compliance by some reasonable means, this is the 287 | first time You have received notice of non-compliance with this License 288 | from such Contributor, and You become compliant prior to 30 days after 289 | Your receipt of the notice. 290 | 291 | 5.2. If You initiate litigation against any entity by asserting a patent 292 | infringement claim (excluding declaratory judgment actions, 293 | counter-claims, and cross-claims) alleging that a Contributor Version 294 | directly or indirectly infringes any patent, then the rights granted to 295 | You by any and all Contributors for the Covered Software under Section 296 | 2.1 of this License shall terminate. 297 | 298 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 299 | end user license agreements (excluding distributors and resellers) which 300 | have been validly granted by You or Your distributors under this License 301 | prior to termination shall survive termination. 302 | 303 | ************************************************************************ 304 | * * 305 | * 6. Disclaimer of Warranty * 306 | * ------------------------- * 307 | * * 308 | * Covered Software is provided under this License on an "as is" * 309 | * basis, without warranty of any kind, either expressed, implied, or * 310 | * statutory, including, without limitation, warranties that the * 311 | * Covered Software is free of defects, merchantable, fit for a * 312 | * particular purpose or non-infringing. The entire risk as to the * 313 | * quality and performance of the Covered Software is with You. * 314 | * Should any Covered Software prove defective in any respect, You * 315 | * (not any Contributor) assume the cost of any necessary servicing, * 316 | * repair, or correction. This disclaimer of warranty constitutes an * 317 | * essential part of this License. No use of any Covered Software is * 318 | * authorized under this License except under this disclaimer. * 319 | * * 320 | ************************************************************************ 321 | 322 | ************************************************************************ 323 | * * 324 | * 7. Limitation of Liability * 325 | * -------------------------- * 326 | * * 327 | * Under no circumstances and under no legal theory, whether tort * 328 | * (including negligence), contract, or otherwise, shall any * 329 | * Contributor, or anyone who distributes Covered Software as * 330 | * permitted above, be liable to You for any direct, indirect, * 331 | * special, incidental, or consequential damages of any character * 332 | * including, without limitation, damages for lost profits, loss of * 333 | * goodwill, work stoppage, computer failure or malfunction, or any * 334 | * and all other commercial damages or losses, even if such party * 335 | * shall have been informed of the possibility of such damages. This * 336 | * limitation of liability shall not apply to liability for death or * 337 | * personal injury resulting from such party's negligence to the * 338 | * extent applicable law prohibits such limitation. Some * 339 | * jurisdictions do not allow the exclusion or limitation of * 340 | * incidental or consequential damages, so this exclusion and * 341 | * limitation may not apply to You. * 342 | * * 343 | ************************************************************************ 344 | 345 | 8. Litigation 346 | ------------- 347 | 348 | Any litigation relating to this License may be brought only in the 349 | courts of a jurisdiction where the defendant maintains its principal 350 | place of business and such litigation shall be governed by laws of that 351 | jurisdiction, without reference to its conflict-of-law provisions. 352 | Nothing in this Section shall prevent a party's ability to bring 353 | cross-claims or counter-claims. 354 | 355 | 9. Miscellaneous 356 | ---------------- 357 | 358 | This License represents the complete agreement concerning the subject 359 | matter hereof. If any provision of this License is held to be 360 | unenforceable, such provision shall be reformed only to the extent 361 | necessary to make it enforceable. Any law or regulation which provides 362 | that the language of a contract shall be construed against the drafter 363 | shall not be used to construe this License against a Contributor. 364 | 365 | 10. Versions of the License 366 | --------------------------- 367 | 368 | 10.1. New Versions 369 | 370 | Mozilla Foundation is the license steward. Except as provided in Section 371 | 10.3, no one other than the license steward has the right to modify or 372 | publish new versions of this License. Each version will be given a 373 | distinguishing version number. 374 | 375 | 10.2. Effect of New Versions 376 | 377 | You may distribute the Covered Software under the terms of the version 378 | of the License under which You originally received the Covered Software, 379 | or under the terms of any subsequent version published by the license 380 | steward. 381 | 382 | 10.3. Modified Versions 383 | 384 | If you create software not governed by this License, and you want to 385 | create a new license for such software, you may create and use a 386 | modified version of this License if you rename the license and remove 387 | any references to the name of the license steward (except to note that 388 | such modified license differs from this License). 389 | 390 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 391 | Licenses 392 | 393 | If You choose to distribute Source Code Form that is Incompatible With 394 | Secondary Licenses under the terms of this version of the License, the 395 | notice described in Exhibit B of this License must be attached. 396 | 397 | Exhibit A - Source Code Form License Notice 398 | ------------------------------------------- 399 | 400 | This Source Code Form is subject to the terms of the Mozilla Public 401 | License, v. 2.0. If a copy of the MPL was not distributed with this 402 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 403 | 404 | If it is not possible or desirable to put the notice in a particular 405 | file, then You may include the notice in a location (such as a LICENSE 406 | file in a relevant directory) where a recipient would be likely to look 407 | for such a notice. 408 | 409 | You may add additional accurate notices of copyright ownership. 410 | 411 | Exhibit B - "Incompatible With Secondary Licenses" Notice 412 | --------------------------------------------------------- 413 | 414 | This Source Code Form is "Incompatible With Secondary Licenses", as 415 | defined by the Mozilla Public License, v. 2.0. 416 | -------------------------------------------------------------------------------- /templates/ms-pl.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Microsoft Public License 6 | spdx-id: MS-PL 7 | source: 'http://opensource.org/licenses/ms-pl' 8 | description: An open source license with a patent grant. 9 | how: >- 10 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 11 | your source code and copy the text of the license into the file. 12 | conditions: 13 | - include-copyright 14 | permissions: 15 | - commercial-use 16 | - modifications 17 | - distribution 18 | - patent-use 19 | - private-use 20 | limitations: 21 | - no-liability 22 | - trademark-use 23 | --- 24 | Microsoft Public License (MS-PL) 25 | 26 | This license governs use of the accompanying software. If you use the software, you 27 | accept this license. If you do not accept the license, do not use the software. 28 | 29 | 1. Definitions 30 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the 31 | same meaning here as under U.S. copyright law. 32 | A "contribution" is the original software, or any additions or changes to the software. 33 | A "contributor" is any person that distributes its contribution under this license. 34 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 35 | 36 | 2. Grant of Rights 37 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 38 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 39 | 40 | 3. Conditions and Limitations 41 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 42 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 43 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 44 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 45 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. 46 | -------------------------------------------------------------------------------- /templates/ms-rl.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Microsoft Reciprocal License 6 | spdx-id: MS-RL 7 | source: 'http://opensource.org/licenses/ms-rl' 8 | description: >- 9 | An open source license with a patent grant similar to the Microsoft Public License, with the additional 11 | condition that any source code for any derived file be provided under this 12 | license. 13 | how: >- 14 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 15 | your source code and copy the text of the license into the file. 16 | conditions: 17 | - disclose-source 18 | - include-copyright 19 | - same-license 20 | permissions: 21 | - commercial-use 22 | - modifications 23 | - distribution 24 | - patent-use 25 | - private-use 26 | limitations: 27 | - no-liability 28 | - trademark-use 29 | --- 30 | Microsoft Reciprocal License (MS-RL) 31 | 32 | This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 33 | 34 | 1. Definitions 35 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. 36 | A "contribution" is the original software, or any additions or changes to the software. 37 | A "contributor" is any person that distributes its contribution under this license. 38 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 39 | 40 | 2. Grant of Rights 41 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 42 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 43 | 44 | 3. Conditions and Limitations 45 | (A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose. 46 | (B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 47 | (C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 48 | (D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 49 | (E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 50 | (F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. 51 | -------------------------------------------------------------------------------- /templates/ofl-1.1.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: SIL Open Font License 1.1 6 | spdx-id: OFL-1.1 7 | redirect_from: /licenses/ofl/ 8 | source: 'http://scripts.sil.org/OFL_web' 9 | description: >- 10 | The Open Font License (OFL) is maintained by SIL International. It attempts to 11 | be a compromise between the values of the free software and typeface design 12 | communities. It is used for almost all open source font projects, including 13 | those by Adobe, Google and Mozilla. 14 | how: >- 15 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 16 | your font source and copy the text of the license into the file. Replace 17 | [year] with the current year and [fullname] ([email]) with the name and 18 | contact email address of each copyright holder. You may take the additional 19 | step of appending a Reserved Font Name notice. This option requires anyone 20 | making modifications to change the font's name, and is not ideal for web fonts 21 | (which all users will modify by changing formats and subsetting for their own 22 | needs.) 23 | note: >- 24 | This license doesn't require source provision, but recommends it. All files 25 | derived from OFL files must remain licensed under the OFL. 26 | conditions: 27 | - include-copyright 28 | - same-license 29 | permissions: 30 | - private-use 31 | - commercial-use 32 | - modifications 33 | - distribution 34 | limitations: 35 | - no-liability 36 | --- 37 | Copyright (c) <%= year %> <%= ask("author.name", "Author's full name?") %> (<%= ask("author.email", "Author's primary email address?") %>) 38 | 39 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 40 | This license is copied below, and is also available with a FAQ at: 41 | http://scripts.sil.org/OFL 42 | 43 | ----------------------------------------------------------- 44 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 45 | ----------------------------------------------------------- 46 | 47 | PREAMBLE 48 | The goals of the Open Font License (OFL) are to stimulate worldwide 49 | development of collaborative font projects, to support the font creation 50 | efforts of academic and linguistic communities, and to provide a free and 51 | open framework in which fonts may be shared and improved in partnership 52 | with others. 53 | 54 | The OFL allows the licensed fonts to be used, studied, modified and 55 | redistributed freely as long as they are not sold by themselves. The 56 | fonts, including any derivative works, can be bundled, embedded, 57 | redistributed and/or sold with any software provided that any reserved 58 | names are not used by derivative works. The fonts and derivatives, 59 | however, cannot be released under any other type of license. The 60 | requirement for fonts to remain under this license does not apply 61 | to any document created using the fonts or their derivatives. 62 | 63 | DEFINITIONS 64 | "Font Software" refers to the set of files released by the Copyright 65 | Holder(s) under this license and clearly marked as such. This may 66 | include source files, build scripts and documentation. 67 | 68 | "Reserved Font Name" refers to any names specified as such after the 69 | copyright statement(s). 70 | 71 | "Original Version" refers to the collection of Font Software components as 72 | distributed by the Copyright Holder(s). 73 | 74 | "Modified Version" refers to any derivative made by adding to, deleting, 75 | or substituting -- in part or in whole -- any of the components of the 76 | Original Version, by changing formats or by porting the Font Software to a 77 | new environment. 78 | 79 | "Author" refers to any designer, engineer, programmer, technical 80 | writer or other person who contributed to the Font Software. 81 | 82 | PERMISSION AND CONDITIONS 83 | Permission is hereby granted, free of charge, to any person obtaining 84 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 85 | redistribute, and sell modified and unmodified copies of the Font 86 | Software, subject to the following conditions: 87 | 88 | 1) Neither the Font Software nor any of its individual components, 89 | in Original or Modified Versions, may be sold by itself. 90 | 91 | 2) Original or Modified Versions of the Font Software may be bundled, 92 | redistributed and/or sold with any software, provided that each copy 93 | contains the above copyright notice and this license. These can be 94 | included either as stand-alone text files, human-readable headers or 95 | in the appropriate machine-readable metadata fields within text or 96 | binary files as long as those fields can be easily viewed by the user. 97 | 98 | 3) No Modified Version of the Font Software may use the Reserved Font 99 | Name(s) unless explicit written permission is granted by the corresponding 100 | Copyright Holder. This restriction only applies to the primary font name as 101 | presented to the users. 102 | 103 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 104 | Software shall not be used to promote, endorse or advertise any 105 | Modified Version, except to acknowledge the contribution(s) of the 106 | Copyright Holder(s) and the Author(s) or with their explicit written 107 | permission. 108 | 109 | 5) The Font Software, modified or unmodified, in part or in whole, 110 | must be distributed entirely under this license, and must not be 111 | distributed under any other license. The requirement for fonts to 112 | remain under this license does not apply to any document created 113 | using the Font Software. 114 | 115 | TERMINATION 116 | This license becomes null and void if any of the above conditions are 117 | not met. 118 | 119 | DISCLAIMER 120 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 121 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 122 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 123 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 124 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 125 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 126 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 127 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 128 | OTHER DEALINGS IN THE FONT SOFTWARE. 129 | -------------------------------------------------------------------------------- /templates/osl-3.0.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Open Software License 3.0 6 | spdx-id: OSL-3.0 7 | source: 'http://opensource.org/licenses/OSL-3.0' 8 | description: >- 9 | OSL 3.0 is a copyleft license that does not require reciprocal licensing on 10 | linked works. It also provides an express grant of patent rights from 11 | contributors to users, with a termination clause triggered if a user files a 12 | patent infringement lawsuit. 13 | how: >- 14 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 15 | your source code and copy the text of the license into the file. Files 16 | licensed under OSL 3.0 must also include the notice "Licensed under the Open 17 | Software License version 3.0" adjacent to the copyright notice. 18 | note: >- 19 | OSL 3.0's author has provided an explanation 21 | behind the creation of the license. 22 | using: 23 | - appserver.io: 'https://github.com/appserver-io/appserver/blob/master/LICENSE.txt' 24 | - Magento 2: 'https://github.com/magento/magento2/blob/develop/LICENSE.txt' 25 | - Restyaboard: 'https://github.com/RestyaPlatform/board/blob/master/LICENSE.txt' 26 | conditions: 27 | - include-copyright 28 | - disclose-source 29 | - document-changes 30 | - network-use-disclose 31 | - same-license 32 | permissions: 33 | - commercial-use 34 | - distribution 35 | - modifications 36 | - patent-use 37 | - private-use 38 | limitations: 39 | - trademark-use 40 | - no-liability 41 | --- 42 | Open Software License ("OSL") v 3.0 43 | 44 | This Open Software License (the "License") applies to any original work of 45 | authorship (the "Original Work") whose owner (the "Licensor") has placed the 46 | following licensing notice adjacent to the copyright notice for the Original 47 | Work: 48 | 49 | Licensed under the Open Software License version 3.0 50 | 51 | 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, 52 | non-exclusive, sublicensable license, for the duration of the copyright, to do 53 | the following: 54 | 55 | a) to reproduce the Original Work in copies, either alone or as part of a 56 | collective work; 57 | 58 | b) to translate, adapt, alter, transform, modify, or arrange the Original 59 | Work, thereby creating derivative works ("Derivative Works") based upon the 60 | Original Work; 61 | 62 | c) to distribute or communicate copies of the Original Work and Derivative 63 | Works to the public, with the proviso that copies of Original Work or 64 | Derivative Works that You distribute or communicate shall be licensed under 65 | this Open Software License; 66 | 67 | d) to perform the Original Work publicly; and 68 | 69 | e) to display the Original Work publicly. 70 | 71 | 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, 72 | non-exclusive, sublicensable license, under patent claims owned or controlled 73 | by the Licensor that are embodied in the Original Work as furnished by the 74 | Licensor, for the duration of the patents, to make, use, sell, offer for sale, 75 | have made, and import the Original Work and Derivative Works. 76 | 77 | 3) Grant of Source Code License. The term "Source Code" means the preferred 78 | form of the Original Work for making modifications to it and all available 79 | documentation describing how to modify the Original Work. Licensor agrees to 80 | provide a machine-readable copy of the Source Code of the Original Work along 81 | with each copy of the Original Work that Licensor distributes. Licensor 82 | reserves the right to satisfy this obligation by placing a machine-readable 83 | copy of the Source Code in an information repository reasonably calculated to 84 | permit inexpensive and convenient access by You for as long as Licensor 85 | continues to distribute the Original Work. 86 | 87 | 4) Exclusions From License Grant. Neither the names of Licensor, nor the names 88 | of any contributors to the Original Work, nor any of their trademarks or 89 | service marks, may be used to endorse or promote products derived from this 90 | Original Work without express prior permission of the Licensor. Except as 91 | expressly stated herein, nothing in this License grants any license to 92 | Licensor's trademarks, copyrights, patents, trade secrets or any other 93 | intellectual property. No patent license is granted to make, use, sell, offer 94 | for sale, have made, or import embodiments of any patent claims other than the 95 | licensed claims defined in Section 2. No license is granted to the trademarks 96 | of Licensor even if such marks are included in the Original Work. Nothing in 97 | this License shall be interpreted to prohibit Licensor from licensing under 98 | terms different from this License any Original Work that Licensor otherwise 99 | would have a right to license. 100 | 101 | 5) External Deployment. The term "External Deployment" means the use, 102 | distribution, or communication of the Original Work or Derivative Works in any 103 | way such that the Original Work or Derivative Works may be used by anyone 104 | other than You, whether those works are distributed or communicated to those 105 | persons or made available as an application intended for use over a network. 106 | As an express condition for the grants of license hereunder, You must treat 107 | any External Deployment by You of the Original Work or a Derivative Work as a 108 | distribution under section 1(c). 109 | 110 | 6) Attribution Rights. You must retain, in the Source Code of any Derivative 111 | Works that You create, all copyright, patent, or trademark notices from the 112 | Source Code of the Original Work, as well as any notices of licensing and any 113 | descriptive text identified therein as an "Attribution Notice." You must cause 114 | the Source Code for any Derivative Works that You create to carry a prominent 115 | Attribution Notice reasonably calculated to inform recipients that You have 116 | modified the Original Work. 117 | 118 | 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that 119 | the copyright in and to the Original Work and the patent rights granted herein 120 | by Licensor are owned by the Licensor or are sublicensed to You under the 121 | terms of this License with the permission of the contributor(s) of those 122 | copyrights and patent rights. Except as expressly stated in the immediately 123 | preceding sentence, the Original Work is provided under this License on an "AS 124 | IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without 125 | limitation, the warranties of non-infringement, merchantability or fitness for 126 | a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK 127 | IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this 128 | License. No license to the Original Work is granted by this License except 129 | under this disclaimer. 130 | 131 | 8) Limitation of Liability. Under no circumstances and under no legal theory, 132 | whether in tort (including negligence), contract, or otherwise, shall the 133 | Licensor be liable to anyone for any indirect, special, incidental, or 134 | consequential damages of any character arising as a result of this License or 135 | the use of the Original Work including, without limitation, damages for loss 136 | of goodwill, work stoppage, computer failure or malfunction, or any and all 137 | other commercial damages or losses. This limitation of liability shall not 138 | apply to the extent applicable law prohibits such limitation. 139 | 140 | 9) Acceptance and Termination. If, at any time, You expressly assented to this 141 | License, that assent indicates your clear and irrevocable acceptance of this 142 | License and all of its terms and conditions. If You distribute or communicate 143 | copies of the Original Work or a Derivative Work, You must make a reasonable 144 | effort under the circumstances to obtain the express assent of recipients to 145 | the terms of this License. This License conditions your rights to undertake 146 | the activities listed in Section 1, including your right to create Derivative 147 | Works based upon the Original Work, and doing so without honoring these terms 148 | and conditions is prohibited by copyright law and international treaty. 149 | Nothing in this License is intended to affect copyright exceptions and 150 | limitations (including "fair use" or "fair dealing"). This License shall 151 | terminate immediately and You may no longer exercise any of the rights granted 152 | to You by this License upon your failure to honor the conditions in Section 153 | 1(c). 154 | 155 | 10) Termination for Patent Action. This License shall terminate automatically 156 | and You may no longer exercise any of the rights granted to You by this 157 | License as of the date You commence an action, including a cross-claim or 158 | counterclaim, against Licensor or any licensee alleging that the Original Work 159 | infringes a patent. This termination provision shall not apply for an action 160 | alleging patent infringement by combinations of the Original Work with other 161 | software or hardware. 162 | 163 | 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this 164 | License may be brought only in the courts of a jurisdiction wherein the 165 | Licensor resides or in which Licensor conducts its primary business, and under 166 | the laws of that jurisdiction excluding its conflict-of-law provisions. The 167 | application of the United Nations Convention on Contracts for the 168 | International Sale of Goods is expressly excluded. Any use of the Original 169 | Work outside the scope of this License or after its termination shall be 170 | subject to the requirements and penalties of copyright or patent law in the 171 | appropriate jurisdiction. This section shall survive the termination of this 172 | License. 173 | 174 | 12) Attorneys' Fees. In any action to enforce the terms of this License or 175 | seeking damages relating thereto, the prevailing party shall be entitled to 176 | recover its costs and expenses, including, without limitation, reasonable 177 | attorneys' fees and costs incurred in connection with such action, including 178 | any appeal of such action. This section shall survive the termination of this 179 | License. 180 | 181 | 13) Miscellaneous. If any provision of this License is held to be 182 | unenforceable, such provision shall be reformed only to the extent necessary 183 | to make it enforceable. 184 | 185 | 14) Definition of "You" in This License. "You" throughout this License, 186 | whether in upper or lower case, means an individual or a legal entity 187 | exercising rights under, and complying with all of the terms of, this License. 188 | For legal entities, "You" includes any entity that controls, is controlled by, 189 | or is under common control with you. For purposes of this definition, 190 | "control" means (i) the power, direct or indirect, to cause the direction or 191 | management of such entity, whether by contract or otherwise, or (ii) ownership 192 | of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial 193 | ownership of such entity. 194 | 195 | 15) Right to Use. You may use the Original Work in all ways not otherwise 196 | restricted or conditioned by this License or by law, and Licensor promises not 197 | to interfere with or be responsible for such uses by You. 198 | 199 | 16) Modification of This License. This License is Copyright © 2005 Lawrence 200 | Rosen. Permission is granted to copy, distribute, or communicate this License 201 | without modification. Nothing in this License permits You to modify this 202 | License as applied to the Original Work or to Derivative Works. However, You 203 | may modify the text of this License and copy, distribute or communicate your 204 | modified version (the "Modified License") and apply it to other original works 205 | of authorship subject to the following conditions: (i) You may not indicate in 206 | any way that your Modified License is the "Open Software License" or "OSL" and 207 | you may not use those names in the name of your Modified License; (ii) You 208 | must replace the notice specified in the first paragraph above with the notice 209 | "Licensed under " or with a notice of your own 210 | that is not confusingly similar to the notice in this License; and (iii) You 211 | may not claim that your original works are open source software unless your 212 | Modified License has been approved by Open Source Initiative (OSI) and You 213 | comply with its license review and certification process. 214 | -------------------------------------------------------------------------------- /templates/unlicense.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: UNLICENSE 5 | title: The Unlicense 6 | spdx-id: Unlicense 7 | source: 'http://unlicense.org/UNLICENSE' 8 | hidden: false 9 | description: >- 10 | A license with no conditions whatsoever which dedicates works to the public 11 | domain. Unlicensed works, modifications, and larger works may be distributed 12 | under different terms and without source code. 13 | how: >- 14 | Create a text file (typically named UNLICENSE or UNLICENSE.txt) in the root of 15 | your source code and copy the text of the license disclaimer into the file. 16 | permissions: 17 | - private-use 18 | - commercial-use 19 | - modifications 20 | - distribution 21 | conditions: [] 22 | limitations: 23 | - no-liability 24 | --- 25 | This is free and unencumbered software released into the public domain. 26 | 27 | Anyone is free to copy, modify, publish, use, compile, sell, or 28 | distribute this software, either in source code form or as a compiled 29 | binary, for any purpose, commercial or non-commercial, and by any 30 | means. 31 | 32 | In jurisdictions that recognize copyright laws, the author or authors 33 | of this software dedicate any and all copyright interest in the 34 | software to the public domain. We make this dedication for the benefit 35 | of the public at large and to the detriment of our heirs and 36 | successors. We intend this dedication to be an overt act of 37 | relinquishment in perpetuity of all present and future rights to this 38 | software under copyright law. 39 | 40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 41 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 42 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 43 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 44 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 45 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 46 | OTHER DEALINGS IN THE SOFTWARE. 47 | 48 | For more information, please refer to 49 | -------------------------------------------------------------------------------- /templates/wtfpl.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: Do What The F*ck You Want To Public License 6 | spdx-id: WTFPL 7 | source: 'http://www.wtfpl.net/' 8 | description: >- 9 | The easiest license out there. It gives the user permissions to do whatever 10 | they want with your code. 11 | how: >- 12 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 13 | your source code and copy the text of the license into the file. 14 | conditions: [] 15 | permissions: 16 | - commercial-use 17 | - modifications 18 | - distribution 19 | - private-use 20 | limitations: [] 21 | --- 22 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 23 | Version 2, December 2004 24 | 25 | Copyright (C) 2004 <%= ask("author.name", "Author's full name?") %> <<%= ask("author.email", "Author's primary email address?") %>> 26 | 27 | Everyone is permitted to copy and distribute verbatim or modified 28 | copies of this license document, and changing it is allowed as long 29 | as the name is changed. 30 | 31 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 32 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 33 | 34 | 0. You just DO WHAT THE FUCK YOU WANT TO. 35 | -------------------------------------------------------------------------------- /templates/zlib.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | deps: [] 3 | rename: 4 | basename: LICENSE 5 | title: zlib License 6 | spdx-id: Zlib 7 | source: 'https://opensource.org/licenses/Zlib' 8 | description: >- 9 | A short permissive license, compatible with GPL. Requires altered source 10 | versions to be documented as such. 11 | how: >- 12 | Create a text file (typically named LICENSE or LICENSE.txt) in the root of 13 | your source code and copy the text of the license into the file. Replace 14 | [year] with the current year and [fullname] with the name (or names) of the 15 | copyright holders. 16 | conditions: 17 | - include-copyright 18 | - document-changes 19 | permissions: 20 | - commercial-use 21 | - modifications 22 | - distribution 23 | - private-use 24 | limitations: 25 | - no-liability 26 | --- 27 | zlib License 28 | 29 | (C) <%= year %> <%= ask("author.name", "Author's full name?") %> 30 | 31 | This software is provided 'as-is', without any express or implied 32 | warranty. In no event will the authors be held liable for any damages 33 | arising from the use of this software. 34 | 35 | Permission is granted to anyone to use this software for any purpose, 36 | including commercial applications, and to alter it and redistribute it 37 | freely, subject to the following restrictions: 38 | 39 | 1. The origin of this software must not be misrepresented; you must not 40 | claim that you wrote the original software. If you use this software 41 | in a product, an acknowledgment in the product documentation would be 42 | appreciated but is not required. 43 | 2. Altered source versions must be plainly marked as such, and must not be 44 | misrepresented as being the original software. 45 | 3. This notice may not be removed or altered from any source distribution. 46 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('mocha'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | var assert = require('assert'); 7 | var bddStdin = require('bdd-stdin'); 8 | var intercept = require('intercept-stdout'); 9 | var generate = require('generate'); 10 | var npm = require('npm-install-global'); 11 | var del = require('delete'); 12 | var generator = require('./'); 13 | var app; 14 | 15 | var actual = path.resolve.bind(path, __dirname, 'actual'); 16 | function exists(name, re, cb) { 17 | if (typeof re === 'function') { 18 | cb = re; 19 | re = /./; 20 | } 21 | 22 | return function(err) { 23 | if (err) return cb(err); 24 | var filepath = actual(name); 25 | fs.stat(filepath, function(err, stat) { 26 | if (err) return cb(err); 27 | assert(stat); 28 | var str = fs.readFileSync(filepath, 'utf8'); 29 | assert(re.test(str)); 30 | del(actual(), cb); 31 | }); 32 | }; 33 | } 34 | 35 | var intercepted = false; 36 | var unhookIntercept = intercept(function(txt) { 37 | if (intercepted) { 38 | if (txt.indexOf('[?25h') === 1) { 39 | intercepted = false; 40 | } 41 | return ''; 42 | } else { 43 | if (txt.indexOf('Which license do you want to write?') !== -1) { 44 | intercepted = true; 45 | return ''; 46 | } else { 47 | return txt; 48 | } 49 | } 50 | }); 51 | 52 | describe('generate-license', function() { 53 | if (!process.env.CI && !process.env.TRAVIS) { 54 | // if tests are being run manually, this will install generate globally 55 | // if it isn't already, so we can test behavior with Generate's CLI 56 | before(function(cb) { 57 | npm.maybeInstall('generate', cb); 58 | }); 59 | } 60 | 61 | after(function() { 62 | unhookIntercept(); 63 | }); 64 | 65 | beforeEach(function(cb) { 66 | app = generate({silent: true}); 67 | app.cwd = actual(); 68 | app.option('dest', actual()); 69 | app.option('askWhen', 'not-answered'); 70 | app.option('basename', 'LICENSE'); 71 | app.option('defaultLicense', 'mit'); 72 | // provide template data to avoid prompts 73 | app.data(require('./package')); 74 | app.data({ 75 | author: { 76 | name: 'Jon Schlinkert', 77 | username: 'jonschlnkert', 78 | url: 'https://github.com/jonschlinkert' 79 | } 80 | }); 81 | del(actual(), cb); 82 | }); 83 | 84 | describe('plugin', function() { 85 | it('should only register the plugin once', function(cb) { 86 | var count = 0; 87 | app.on('plugin', function(name) { 88 | if (name === 'generate-license') { 89 | count++; 90 | } 91 | }); 92 | app.use(generator); 93 | app.use(generator); 94 | app.use(generator); 95 | assert.equal(count, 1); 96 | cb(); 97 | }); 98 | 99 | it('should extend tasks onto the instance', function() { 100 | app.use(generator); 101 | assert(app.tasks.hasOwnProperty('default')); 102 | assert(app.tasks.hasOwnProperty('license')); 103 | }); 104 | }); 105 | 106 | describe('tasks', function() { 107 | beforeEach(function() { 108 | app.use(generator); 109 | }); 110 | 111 | it('should run the `default` task with .build', function(cb) { 112 | bddStdin('\n'); 113 | app.build('default', exists('LICENSE', /MIT License/, cb)); 114 | }); 115 | 116 | it('should run the `default` task with .generate', function(cb) { 117 | bddStdin('\n'); 118 | app.generate('default', exists('LICENSE', /MIT License/, cb)); 119 | }); 120 | 121 | it('should run the `license` task with .build', function(cb) { 122 | bddStdin('\n'); 123 | app.build('license', exists('LICENSE', /MIT License/, cb)); 124 | }); 125 | 126 | it('should run the `license` task with .generate', function(cb) { 127 | bddStdin('\n'); 128 | app.generate('license', exists('LICENSE', /MIT License/, cb)); 129 | }); 130 | }); 131 | 132 | if (!process.env.CI && !process.env.TRAVIS) { 133 | describe('generator (CLI)', function() { 134 | it('should run the default task using the `generate-license` name', function(cb) { 135 | bddStdin('\n'); 136 | app.use(generator); 137 | app.generate('generate-license', exists('LICENSE', /MIT License/, cb)); 138 | }); 139 | 140 | it('should run the default task using the `license` generator alias', function(cb) { 141 | bddStdin('\n'); 142 | app.use(generator); 143 | app.generate('license', exists('LICENSE', /MIT License/, cb)); 144 | }); 145 | }); 146 | } 147 | 148 | describe('generator (API)', function() { 149 | it('should run the `agpl-3.0` task when defined explicitly', function(cb) { 150 | app.register('license', generator); 151 | app.generate('license:agpl-3.0', exists('LICENSE', /GNU AFFERO GENERAL PUBLIC LICENSE/, cb)); 152 | }); 153 | it('should run the `apache-2.0` task when defined explicitly', function(cb) { 154 | app.register('license', generator); 155 | app.generate('license:apache-2.0', exists('LICENSE', /Apache License/, cb)); 156 | }); 157 | it('should run the `artistic-2.0` task when defined explicitly', function(cb) { 158 | app.register('license', generator); 159 | app.generate('license:artistic-2.0', exists('LICENSE', /The Artistic License/, cb)); 160 | }); 161 | it('should run the `mit` task when defined explicitly', function(cb) { 162 | app.register('license', generator); 163 | app.generate('license:mit', exists('LICENSE', /MIT License/, cb)); 164 | }); 165 | it('should run the `lgpl-3.0` task when defined explicitly', function(cb) { 166 | app.register('license', generator); 167 | app.generate('license:lgpl-3.0', exists('LICENSE.lesser', /GNU LESSER/, cb)); 168 | }); 169 | it('should run the default task on the generator', function(cb) { 170 | bddStdin('\n'); 171 | app.register('license', generator); 172 | app.generate('license', exists('LICENSE', /MIT License/, cb)); 173 | }); 174 | it('should run the `license` task', function(cb) { 175 | bddStdin('\n'); 176 | app.register('license', generator); 177 | app.generate('license:license', exists('LICENSE', /MIT License/, cb)); 178 | }); 179 | it('should run the `default` task when defined explicitly', function(cb) { 180 | bddStdin('\n'); 181 | app.register('license', generator); 182 | app.generate('license:default', exists('LICENSE', /MIT License/, cb)); 183 | }); 184 | }); 185 | 186 | describe('sub-generator', function() { 187 | it('should work as a sub-generator', function(cb) { 188 | bddStdin('\n'); 189 | app.register('foo', function(foo) { 190 | foo.register('license', generator); 191 | }); 192 | app.generate('foo.license', exists('LICENSE', /MIT License/, cb)); 193 | }); 194 | 195 | it('should run the `default` task by default', function(cb) { 196 | bddStdin('\n'); 197 | app.register('foo', function(foo) { 198 | foo.register('license', generator); 199 | }); 200 | app.generate('foo.license', exists('LICENSE', /MIT License/, cb)); 201 | }); 202 | 203 | it('should run the `license:default` task when defined explicitly', function(cb) { 204 | bddStdin('\n'); 205 | app.register('foo', function(foo) { 206 | foo.register('license', generator); 207 | }); 208 | app.generate('foo.license:default', exists('LICENSE', /MIT License/, cb)); 209 | }); 210 | 211 | it('should run the `license:license` task', function(cb) { 212 | bddStdin('\n'); 213 | app.register('foo', function(foo) { 214 | foo.register('license', generator); 215 | }); 216 | app.generate('foo.license:license', exists('LICENSE', /MIT License/, cb)); 217 | }); 218 | 219 | it('should work with nested sub-generators', function(cb) { 220 | bddStdin('\n'); 221 | app 222 | .register('foo', generator) 223 | .register('bar', generator) 224 | .register('baz', generator); 225 | app.generate('foo.bar.baz', exists('LICENSE', /MIT License/, cb)); 226 | }); 227 | }); 228 | }); 229 | --------------------------------------------------------------------------------