Permalink
Browse files

Add docs for license entry.

  • Loading branch information...
mfncooper authored and luk- committed Mar 10, 2013
1 parent ce14e17 commit 350c7d6f8259dae1f349b2f848b4ecba41cbf46f
Showing with 21 additions and 0 deletions.
  1. +21 −0 doc/cli/json.md
View
@@ -118,6 +118,27 @@ you can specify the value for "bugs" as a simple string instead of an object.
If a url is provided, it will be used by the `npm bugs` command.
+## license
+
+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.
+
+The simplest way, assuming you're using a common license such as BSD or MIT, is
+to just specify the name of the license you're using, like this:
+
+ { "license" : "BSD" }
+
+If you have more complex licensing terms, or you want to provide more detail
+in your package.json file, you can use the more verbose plural form, like this:
+
+ "licenses" : [
+ { "type" : "MyLicense"
+ , "url" : "http://github.com/owner/project/path/to/license"
+ }
+ ]
+
+It's also a good idea to include a license file at the top level in your package.
+
## people fields: author, contributors
The "author" is one person. "contributors" is an array of people. A "person"

0 comments on commit 350c7d6

Please sign in to comment.