diff options
Diffstat (limited to 'deps/npm/html/partial/doc/files/npm-json.html')
-rw-r--r-- | deps/npm/html/partial/doc/files/npm-json.html | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html index f5fadd1b6..055f8c486 100644 --- a/deps/npm/html/partial/doc/files/npm-json.html +++ b/deps/npm/html/partial/doc/files/npm-json.html @@ -69,16 +69,44 @@ you can specify the value for "bugs" as a simple string instead of an <h2 id="license">license</h2> <p>You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.</p> -<p>The simplest way, assuming you're using a common license such as BSD-3-Clause -or MIT, is to just specify the standard SPDX ID of the license you're using, -like this:</p> +<p>If you're using a common license such as BSD-2-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this:</p> <pre><code>{ "license" : "BSD-3-Clause" } </code></pre><p>You can check <a href="https://spdx.org/licenses/">the full list of SPDX license IDs</a>. Ideally you should pick one that is <a href="http://opensource.org/licenses/alphabetical">OSI</a> approved.</p> -<p>It's also a good idea to include a LICENSE file at the top level in -your package.</p> -<h2 id="people-fields-author-contributors">people fields: author, contributors</h2> +<p>If your package is licensed under multiple common licenses, use an <a href="http://npmjs.com/package/spdx">SPDX license +expression syntax version 2.0 string</a>, like this:</p> +<pre><code>{ "license" : "(ISC OR GPL-3.0)" } +</code></pre><p>If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use the following valid SPDX expression:</p> +<pre><code>{ "license" : "LicenseRef-LICENSE" } +</code></pre><p>Then include a LICENSE file at the top level of the package.</p> +<p>Some old packages used license objects or a "licenses" property containing an +array of license objects:</p> +<pre><code>// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www.opensource.org/licenses/mit-license.php" + } + , { "type": "Apache-2.0" + , "url": "http://opensource.org/licenses/apache2.0.php" + } + ] +} +</code></pre><p>Those styles are now deprecated. Instead, use SPDX expressions, like this:</p> +<pre><code>{ "license": "ISC" } + +{ "license": "(MIT OR Apache-2.0)" } +</code></pre><h2 id="people-fields-author-contributors">people fields: author, contributors</h2> <p>The "author" is one person. "contributors" is an array of people. A "person" is an object with a "name" field and optionally "url" and "email", like this:</p> <pre><code>{ "name" : "Barney Rubble" |