Required
Type: String
The name of the package as stored in the registry.
- Must be unique.
- Should be slug style for simplicity, consistency and compatibility. Example:
unicorn-cake
- Lowercase, a-z, can contain digits, 0-9, can contain dash or dot but not start/end with them.
- Consecutive dashes or dots not allowed.
- 50 characters or less.
Recommended
Type: String
Any character. Max 140.
Help users identify and search for your package with a brief description. Describe what your package does, rather than what it's made of. Will be displayed in search/lookup results on the CLI and the website that can be used to search for packages.
Ignored by Bower as git tags are used instead.
Intended to be used in the future when Bower gets a real registry where you can publish actual packages, but for now just leave it out.
The package's semantic version number.
- Must be a semantic version parseable by node-semver.
- If publishing a folder, the version must be higher than the version stored in the registry, when republishing.
- Version should only be required if you are not using git tags.
Recommended
Type: String
or Array
of String
The primary acting files necessary to use your package. While Bower does not directly use these files, they are listed with the commands bower list --json
and bower list --paths
, so they can be used by build tools.
- Preprocessor files like CoffeeScript should be compiled.
- Do not include minified files.
- Filenames should not be versioned (Bad: package.1.1.0.js; Good: package.js).
Recommended
Type: String
or Array
of String
SPDX license identifier or path/url to a license.
Recommended
Type: Array
of String
A list of files for Bower to ignore when installing your package.
Note: README (all variants of case, .md, .text) and bower.json will never be ignored.
The ignore rules follow the same rules specified in the gitignore pattern spec.
Recommended
Type: Array
of String
Same format requirements as name.
Used for search by keyword. Helps make your package easier to discover without people needing to know its name. Recommended.
Type: Array
of (String
or Object
)
A list of people that authored the contents of the package.
Either:
"authors": [
"John Doe", "John Doe <[email protected]>",
"John Doe <[email protected]> (http://johndoe.com)"
]
or:
"authors": [
{ "name": "John Doe" },
{ "name": "John Doe", "email": "[email protected]" },
{ "name": "John Doe", "email": "[email protected]", "homepage": "http://johndoe.com" }
]
Type: String
URL to learn more about the package. Falls back to GitHub project if not specified and it’s a GitHub endpoint.
Type: Object
The repository in which the source code can be found.
"repository": {
"type": "git",
"url": "git://github.com/foo/bar.git"
}
Type: Object
Dependencies are specified with a simple hash of package name to a semver compatible identifier or URL.
- Key must be a valid name.
- Value must be a valid version, a Git URL, or a URL (inc. tarball and zipball).
- Value can be an owner/package shorthand, i.e. owner/package. By default, the shorthand resolves to GitHub -> https://github.com/owner/package. This may be changed in
.bowerrc
shorthand_resolver. - Local paths may be used as values for local development, but they will be disallowed when registering.
Type: Object
Same rules as dependencies
.
Dependencies that are only needed for development of the package, e.g., test framework or building documentation.
Type: Object
Dependency versions to automatically resolve with if conflicts occur between packages.
Example:
"resolutions": {
"angular": "1.3.0-beta.16"
}
Type: Boolean
If you set it to true
it will refuse to publish it. This is a way to prevent accidental publication of private repositories.