Wizzi schema npmpackage

Exports
cpu
Element Tag Super Flags
xpackage package
Description
The root element of the wfpackage schema.   The wzName is the package name.   The most important things in your package.json are the name and version fields.   Those are actually required, and your package won't install without them.   The name and version together form an identifier that is assumed to be completely unique.   Changes to the package should come along with changes to the version.   The name is what your thing is called.  
Attributes
Name Tag Type Default Inherited Flags Description
version version string
Version must be parseable by node-semver, which is bundled with npm as a dependency.   (npm install semver to use it yourself.)  
description description string
Put a description in it. It's a string.   This helps people discover your package, as it's listed in npm search.  
keywords keywords string
Put keywords in it. It's an array of strings.   This helps people discover your package as it's listed in npm search.  
license license string
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.  
homepage homepage string
The url to the project homepage.   NOTE: This is not the same as "url". If you put a "url" field, then the registry will think it's a redirection to your package that has been published somewhere else, and spit at you.  
preferGlobal preferGlobal boolean false
If your package is primarily a command-line application that should be installed globally, then set this value to true to provide a warning if it is installed locally.   It doesn't actually prevent users from installing it locally, but it does help prevent some confusion if it doesn't work as expected.  
main main string
The main field is a module ID that is the primary entry point to your program. That is, if your package is named foo, and a user installs it, and then does require("foo"), then your main module's exports object will be returned.   This should be a module ID relative to the root of your package folder.  
private private boolean false
Consider also setting "private": true to prevent accidental publication.  
Relations
Name Role Cardinality Inherited Flags Description
bugs one-to-one is-one-to-one
author one-to-one is-one-to-one
contributor contributors one-to-many
file files one-to-many
repository one-to-one is-one-to-one
script scripts one-to-many
config configs one-to-many
publishConfig publishConfigs one-to-many
dependency dependencies one-to-many
peerDependency peerDependencies one-to-many
bundledDependency bundledDependencies one-to-many
optionalDependency optionalDependencies one-to-many
engine one-to-one is-one-to-one
os oses one-to-many
cpu cpus one-to-many
Element Tag Super Flags
bugs bugs
Description
The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.   The wzName is the url.  
Attributes
Name Tag Type Default Inherited Flags Description
email email string
Element Tag Super Flags
person person
Attributes
Name Tag Type Default Inherited Flags Description
name name string
email email string
url url string
Element Tag Super Flags
author author person
Attributes
Name Tag Type Default Inherited Flags Description
name name string person
email email string person
url url string person
Element Tag Super Flags
contributor contributor person
Attributes
Name Tag Type Default Inherited Flags Description
name name string person
email email string person
url url string person
Element Tag Super Flags
file file
Description
Certain files are always included, regardless of settings   Conversely, some files are always ignored  
Element Tag Super Flags
bin bin
Description
A lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this feature to install the "npm" executable.)   To use this, supply a bin field in your package.json which is a map of command name to local file name.   On install, npm will symlink that file into prefix/bin for global installs, or ./node_modules/.bin/ for local installs.   The wzName is the command name  
Attributes
Name Tag Type Default Inherited Flags Description
path path string
The path to a local file name  
Element Tag Super Flags
repository repository
Description
Specify the place where your code lives. This is helpful for people who want to contribute.   If the git repo is on GitHub, then the npm docs command will be able to find you.   The wzName is the repository type (example: git)  
Attributes
Name Tag Type Default Inherited Flags Description
url url string
Element Tag Super Flags
script script
Description
The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point.   The wzName is the script name  
Attributes
Name Tag Type Default Inherited Flags Description
command command string
Element Tag Super Flags
config config
Description
A "config" object can be used to set configuration parameters used in package scripts that persist across upgrades.   See npm-config(7) and npm-scripts(7) for more on package configs.  
Attributes
Name Tag Type Default Inherited Flags Description
value value string
Element Tag Super Flags
publishConfig publish-config
Description
This is a set of config values that will be used at publish-time.   It's especially handy if you want to set the tag, registry or access, so that you can ensure that a given package is not tagged with "latest",   published to the global public registry or that a scoped module is private by default.   Any config values can be overridden, but of course only "tag", "registry" and "access" probably matter for the purposes of publishing.   See npm-config(7) to see the list of config options that can be overridden.  
Attributes
Name Tag Type Default Inherited Flags Description
value value string
Element Tag Super Flags
dependency depend
Description
Dependencies are specified in a simple object that maps a package name to a version range.   Git URLs as Dependencies   Git urls can be of the form:   git://github.com/user/project.git#commit-ish   git+ssh://user@hostname:project.git#commit-ish   git+ssh://user@hostname/project.git#commit-ish   git+http://user@hostname/project/blah.git#commit-ish   git+https://user@hostname/project/blah.git#commit-ish   The commit-ish can be any tag, sha, or branch which can be supplied as an argument to git checkout. The default is master.     GitHub URLs   As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a commit-ish suffix can be included.   For example:   {   "name": "foo",   "version": "0.0.0",   "dependencies": {   "express": "visionmedia/express",   "mocha": "visionmedia/mocha#4727d357ea"   }   }     Local Paths   As of version 2.0.0 you can provide a path to a local directory that contains a package.   Local paths can be saved using npm install --save, using any of these forms:   ../foo/bar   ~/foo/bar   ./foo/bar   /foo/bar   in which case they will be normalized to a relative path and added to your package.json.   For example:   {   "name": "baz",   "dependencies": {   "bar": "file:../foo/bar"   }   }   This feature is helpful for local offline development and creating tests that require npm installing   where you don't want to hit an external server, but should not be used when publishing packages to the public registry.  
Attributes
Name Tag Type Default Inherited Flags Description
version version string
The version range is a string which has one or more space-separated descriptors.   Dependencies can also be identified with a tarball or git URL.   See semver(7) for more details about specifying version ranges.  
Element Tag Super Flags
devDependency_dev_depend devDependency dev-depend
Description
If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use.   In this case, it's best to map these additional items in a devDependencies object.   These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm configuration param. See npm-config(7) for more on the topic.   For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the prepublish script to do this, and make the required package a devDependency.   For example:   {   "name": "ethopia-waza",   "description": "a delightfully fruity coffee varietal",   "version": "1.2.3",   "devDependencies": {   "coffee-script": "~1.6.3"   },   "scripts": {   "prepublish": "coffee -o lib/ -c src/waza.coffee"   },   "main": "lib/waza.js"   }   The prepublish script will be run before publishing, so that users can consume the functionality without requiring them to compile it themselves. In dev mode (ie, locally running npm install), it'll run this script as well, so that you can test it easily.  
Element Tag Super Flags
peerDependency peer-depend
Description
In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a require of this host. This is usually referred to as a plugin. Notably, your module may be exposing a specific interface, expected and specified by the host documentation.   For example:   {   "name": "tea-latte",   "version": "1.3.5",   "peerDependencies": {   "tea": "2.x"   }   }   This ensures your package tea-latte can be installed along with the second major version of the host package tea only. npm install tea-latte could possibly yield the following dependency graph:   ├── tea-latte@1.3.5   └── tea@2.2.0   NOTE: npm versions 1 and 2 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency tree. In the next major version of npm (npm@3), this will no longer be the case. You will receive a warning that the peerDependency is not installed instead. The behavior in npms 1 & 2 was frequently confusing and could easily put you into dependency hell, a situation that npm is designed to avoid as much as possible.   Trying to install another plugin with a conflicting requirement will cause an error. For this reason, make sure your plugin requirement is as broad as possible, and not to lock it down to specific patch versions.   Assuming the host complies with semver, only changes in the host package's major version will break your plugin. Thus, if you've worked with every 1.x version of the host package, use "^1.0" or "1.x" to express this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2".  
Element Tag Super Flags
bundledDependency bundled-depend
Description
Array of package names that will be bundled when publishing the package.   If this is spelled "bundleDependencies", then that is also honored.  
Element Tag Super Flags
optionalDependency optional-depend
Description
If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the optionalDependencies object. This is a map of package name to version or url, just like the dependencies object. The difference is that build failures do not cause installation to fail.   It is still your program's responsibility to handle the lack of the dependency. For example, something like this:  
Element Tag Super Flags
engine engine
Description
You can specify the version of node that your stuff works on   If you specify an "engines" field, then npm will require that "node" be somewhere on that list.   If "engines" is omitted, then npm will just assume that it works on node.   Note that, unless the user has set the engine-strict config flag, this field is advisory only.  
Attributes
Name Tag Type Default Inherited Flags Description
version version string
Element Tag Super Flags
os os
Description
You can specify which operating systems your module will run on: (example: darwin)   You can also blacklist instead of whitelist operating systems, just prepend the blacklisted os with a '!': (example: !win32)  
Element Tag Super Flags
cpu cpu
Description
If your code only runs on certain cpu architectures, you can specify which ones.   Like the os option, you can also blacklist architectures