Packages are defined by a manifest file
bower.json. This is similar to Node’s
package.json or Ruby’s
Interactively create a
Detailed specification of
bower.json file can be found in bower/spec repository.
bower install <package> --save will add
<package> to your project’s
bower install <package> --save-dev will add
<package> to your
Registering your package allows others to install it with a short name, like
bower install <my-package-name>.
To register a new package:
- The package name must adhere to the bower.json spec.
- There must be a valid
bower.jsonin the project’s root directory.
- Your package should use semver Git tags. The
vprefix is allowed.
- Your package must be publically available at a Git endpoint (e.g., GitHub). Remember to push your Git tags!
- For private packages (e.g. GitHub Enterprise), please consider running a private Bower registry.
Now anyone can run
bower install <my-package-name>, and get your library installed. The Bower registry does not have authentication or user management at this point in time. It’s on a first come, first served basis.
Bower doesn’t support GitHub-style namespacing (
org/repo), however you are encouraged to namespace related packages with
-, for example,
Please do not squat on package names. Register your package and claim your name after you have a valid public repo with working code.
For package name transfers, intellectual property and other disputes, please try to resolve with the owner first. If no resolution, please submit a ticket in the Bower Registry repo and the Bower Core Team will assist.
You’ll likely want to
bower cache clean after your change. At the moment the
unregister command is temporarily disabled. You can check out this issue - #2210, for more information. However, you can request a package to be unregistered manually.