Coder Social home page Coder Social logo

bower.json-spec's Introduction

bower.json specification

name

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.

description

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.

version

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.

Type: `String`

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.

main

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).

license

Recommended
Type: String or Array of String

SPDX license identifier or path/url to a license.

ignore

Recommended
Type: Array of String

A list of files for Bower to ignore when installing your package.

Note: symbolic links will always be ignored. However bower.json will never be ignored.

The ignore rules follow the same rules specified in the gitignore pattern spec.

keywords

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.

authors

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" }
]

homepage

Type: String

URL to learn more about the package. Falls back to GitHub project if not specified and it’s a GitHub endpoint.

repository

Type: Object

The repository in which the source code can be found.

"repository": {
  "type": "git",
  "url": "git://github.com/foo/bar.git"
}

dependencies

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).
  • Git URLs can be restricted to a reference (revision SHA, branch, or tag) by appending it after a hash, e.g. https://github.com/owner/package.git#branch.
  • 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.

devDependencies

Type: Object

Same rules as dependencies.

Dependencies that are only needed for development of the package, e.g., test framework or building documentation.

resolutions

Type: Object

Dependency versions to automatically resolve with if conflicts occur between packages.

Example:

"resolutions": {
  "angular": "1.3.0-beta.16"
}

private

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.