Giter VIP home page Giter VIP logo

bower.github.io's Introduction

Bower - A package manager for the web

Build Backers on Open Collective Sponsors on Open Collective

..psst! While Bower is maintained, we recommend yarn and webpack or parcel for new front-end projects!


Bower offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.

Bower runs over Git, and is package-agnostic. A packaged component can be made up of any type of asset, and use any type of transport (e.g., AMD, CommonJS, etc.).

View complete docs on bower.io

View all packages available through Bower's registry.

Install

$ npm install -g bower

Bower depends on Node.js and npm. Also make sure that git is installed as some bower packages require it to be fetched and installed.

Usage

See complete command line reference at bower.io/docs/api/

Installing packages and dependencies

# install dependencies listed in bower.json
$ bower install

# install a package and add it to bower.json
$ bower install <package> --save

# install specific version of a package and add it to bower.json
$ bower install <package>#<version> --save

Using packages

We discourage using bower components statically for performance and security reasons (if component has an upload.php file that is not ignored, that can be easily exploited to do malicious stuff).

The best approach is to process components installed by bower with build tool (like Grunt or gulp), and serve them concatenated or using a module loader (like RequireJS).

Uninstalling packages

To uninstall a locally installed package:

$ bower uninstall <package-name>

prezto and oh-my-zsh users

On prezto or oh-my-zsh, do not forget to alias bower='noglob bower' or bower install jquery\#1.9.1

Never run Bower with sudo

Bower is a user command; there is no need to execute it with superuser permissions.

Windows users

To use Bower on Windows, you must install Git for Windows correctly. Be sure to check the options shown below:

Git for Windows

Git for Windows

Note that if you use TortoiseGit and if Bower keeps asking for your SSH password, you should add the following environment variable: GIT_SSH - C:\Program Files\TortoiseGit\bin\TortoisePlink.exe. Adjust the TortoisePlink path if needed.

Ubuntu users

To use Bower on Ubuntu, you might need to link nodejs executable to node:

sudo ln -s /usr/bin/nodejs /usr/bin/node

Configuration

Bower can be configured using JSON in a .bowerrc file. Read over available options at bower.io/docs/config.

Support

You can ask questions on following channels in order:

Contributing

We welcome contributions of all kinds from anyone. Please take a moment to review the guidelines for contributing.

Note that on Windows for tests to pass you need to configure Git before cloning:

git config --global core.autocrlf input

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

License

Copyright (c) 2012-present Twitter and other contributors

Licensed under the MIT License

bower.github.io's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bower.github.io's Issues

Brand guidelines

there should be a page that has brand guidelines for the logo.

  • Logo.png
  • logo.svg
  • typography
  • colors

Capital B "Bower"

How do I update registered data

Hi,

I've register a bower package aaa-settings-dialog. After registering the package I noticed that some of the metadata in the bower.json manifest was incorrect. I have corrected the local bower.json file and I now want the bower registry updated. How do I do this?

I've tried rerunning the bower register command with the same package name but this fails as follows:

bower register git://github.com/Will-in-BC/aaa-settings-dialog.git
bower EUNKNOWN Unknown error: 403

Template for translate

There is no template for translate pages to other languages.this can help bower community.

Consider relying on Jekyll / deployment

Consider using Jekyll or deploying elsewhere, once the site is a bit more complex. Can do what HTML5 Boilerplate does and have a post-push hook to deploy the site elsewhere. Jekyll would be simpler.

JSON file, "main" ?

from the docs:
main - string or array: The primary endpoints of your package.


What does that supposed to mean?? what is an "endpoint" anyway? this is the worst description ever. Lets say I have a jQuery plugin, it has javascript, css and an image. what now? This explains nothing.

Embed an unobtrusive web IRC client

The bower channel on freenode could be a great place for users and component publishers to get help, but it's not very accessible to many potential users; the only mention is way down the page and not everyone is on IRC anyway. It would be far more accessible if there was a non-sucky live chat embedded on the page, something like this: http://scrollback.io/pwn/bower/bower.io

Disclaimer: I'm one of the guys that wrote Scrollback.

Additional notes:

  • It won't connect people to the channel until they say something (no redundant join/parts)
  • The server has an I-Line at freenode (hundreds of users can connect)
  • It reports IP addresses to freenode so chanops can ban individual users.
  • Infinite scrollback (duh) so people can refer to past conversations. Search is coming soon.

I can send a pull request if you're interested.

Failed to read bower.json

Write detailed error report (number row and character)

I have:
Additional error details:
Unexpected token n

and can't fix

Links "Contributing to this project" do not work

All four links in this section are relative links to CONTRIBUTING.md which become http://bower.io/CONTRIBUTING.md on this site.

Either use absolute links in the README or fix relative paths after import.

bowerrc docs

Here's the import from gdocs:

The Bower configuration alters the behaviour of Bower on the local system.

The config is obtained by merging multiple configurations by this order of 
importance:

* [cli args via --config.*]
* environment variables
* local bowerrc located in the cwd
* all bowerrc files upwards the directory tree
* bowerrc file located in the home folder
* bowerrc file located in the global folder

Example of valid environment variables:

* `bower_endpoint_parser` is evaluated as `endpoint-parser`
* `bower_storage__cache` is evaluated as `storage.cache`

The bowerrc file mentioned must be a JSON valid file.

## cwd [string]

The directory from which bower should run. All relative paths will be calculated 
according to this setting.  

## directory [string]

The path in which installed components should be saved. If not specified this 
defaults to `bower_components`.  

## registry [object string]

The registry config. Can be an object or a string. If a string is used, all the 
property values bellow will have its value. Defaults to the bower registry URL.

If your organization wishes to maintain a private registry, you may change the 
values below.

## registry.search [array string]

An array of URLs pointing to read-only Bower registries. A string means only 
one. When looking into the registry for an endpoint, Bower will query these 
registries by the specified order.

**registry.register [string]**

The URL to use when registering packages. 

**registry.publish [string]**

The URL to use when publish packages.  


## shorthand-resolver [string]

Define a custom template for shorthand package names.  
Defaults to git://github.com/{{owner}}/{{package}}.git

The `shorthand-resolver` key provides support for defining a custom template 
which Bower uses when constructing a URL for a given shorthand. For example, if 
a shorthand of `twitter/flight` or `twitter/flight#v1.0.0` is specified in the 
package's manifest dependencies, the following data can be referenced from 
within the `shorthand-resolver` template:

owner: "twitter"  
package: "flight"  
shorthand: "twitter/flight"

Examples:

    "shorthand-resolver": "git://example.com/{{owner}}/components/{{package}}.git"
    "shorthand-resolver": "git://example.com/{{shorthand}}.git"

**proxy [string]**

The proxy to use for http requests.

**https-proxy [string]**

The proxy to use for https requests.

**user-agent [string]**

Sets the User-Agent for each request made.  
Defaults to: node/{process.version} {process.platform} {process.arch}

**timeout [****number****]**

The timeout to be used when making requests in milliseconds, defaults to 
60000ms.

**strict-ssl [boolean]**

Whether or not to do SSL key validation when making requests via https.

**ca [object string****]**

The CA certificates to be used, defaults to null. This is similar to the 
registry key, specifying each CA to use for each registry endpoint.

The Certificate Authority signing certificate that is trusted for SSL 
connections to the registry.  
Set to null to only allow "known" registrars, or to a specific CA cert to trust 
only that specific signing authority.

**color [boolean]**

Enable or disable use of colors in the CLI output. Defaults to true.

**storage**** [object]**

Where to store persistent data, such as cache, needed by bower. Defaults to 
paths that suite the OS/platform. Valid keys are `cache`, `registry`, `links`, 
`completion`.

**tmp [string]**

Where to store temporary files and folders. Defaults to the system temporary 
directory suffixed with /bower.

**interactive ****[boolean]**

Makes bower interactive, prompting whenever necessary. Defaults to `null` which 
means `auto`.

http://twitter.github.com/bower/ → 404

Right now http://twitter.github.com/bower/ → 404

$ curl -LIsS http://twitter.github.com/bower/

HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Date: Wed, 01 May 2013 12:20:58 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://twitter.github.io/bower/
Expires: Wed, 01 May 2013 12:30:58 GMT
Cache-Control: max-age=600
Vary: Accept-Encoding

HTTP/1.1 404 Not Found
Server: GitHub.com
Date: Wed, 01 May 2013 12:20:58 GMT
Content-Type: text/html
Content-Length: 8456
Connection: keep-alive

I've seen a lot of links around the web pointing to http://twitter.github.com/bower/ (including in the bower-server repository description) so, I think this should be fixed somehow, either by a redirect or at least an empty repository telling people about the move (e.g.: paulirish/html5-boilerplate).

Maintain a list of tools consuming/using Bower

(Ported from bower/bower#354)

As people start to write tools to work with Bower in different development setups, we should maintain a list of the best / most useful tools. Hopefully it will encourage people to use Bower in a setting that they feel comfortable with. This would be something to include on the project page / website. For now, we can keep a catalogue in this issue:

alfred-workflow
A collection of Alfred workflows that includes Bower integration.

bower
Bower integration for your Ruby apps (sprockets).

bower-rails
rake tasks for Bower on Rails.

cakephp-bower
CakePHP Plugin for Bower

grunt-bower-concat
Grunt task for automatically concat all installed Bower components.

grunt-bower-install
Inject your Bower components right into your HTML using Grunt.

grunt-bower-requirejs
Automagically wire-up installed Bower components into your RequireJS config.

grunt bower-task
Grunt plugin to automate Bower commands; allow the configuration of the files needed allowing to filter out the minimal in the project.

kooshy-fe
Integrates a web-based interface for Bower

ruby-bower
Ruby binding for Bower commands (Uses node/execjs instead of shelling out)

SpBowerBundle
Bower integration with symfony2.

sublime-bower
A Sublime text-editor plugin for Bower.

404 for http://bower.io/search/

Search seems to be down (and I'm not sure how this is backed by GitHub Pages):

$ wget -S http://bower.io/search/
--2014-06-17 11:23:25--  http://bower.io/search/
Resolving bower.io... 192.30.252.153, 192.30.252.154
Connecting to bower.io|192.30.252.153|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 404 Not Found
  Server: GitHub.com
  Date: Tue, 17 Jun 2014 18:23:55 GMT
  Content-Type: text/html; charset=utf-8
  Content-Length: 9371
2014-06-17 11:23:25 ERROR 404: Not Found.

Google's cache has a working version at Jun 15, 2014 17:14:40 GMT.

Documentation / Getting started

The website should have docs on how to use Bower, workflow, etc.

Also basic docs on publishing to Bower; complete details should be within the CLI tool's help pages (separate issue).

New section for news

Since we don't have a blog, we should have a place to post snippets of news with a RSS feed. Twitter is nice but user needs to parse through non-news content. Can just be a single page that we keep appending to.

Example content:

  • CLI releases
  • Planned downtime
  • Deprecation (e.g. just received email from heroku today that bower.heroku.com routing will be deprecated)

Documentation problem

The webpage is not updated to the latest README in master.

For example, in the website I can read:

All package contents are installed in the components directory by default. You should never directly modify the contents of this directory.

The README.md is like this:

All package contents are installed in the bower_components directory by default. You should never directly modify the contents of this directory as any changes can and probably will get removed.

I think this is a major problem.

Bower shirts

I added a promotion for the Bower shirts on the homepage. This is a limited time offer, ending December 8th — at which point I'll remove it.

These shirts are sold at cost, so I'm not trying to make a buck. Just trying to spread the Bower 🐦 .

It looks like this

screen shot 2014-12-01 at 11 18 26 pm

Docs for configuration should have examples

The docs for configuring bower should have examples.

storage

Object

Where to store persistent data, such as cache, needed by bower. Defaults to paths that suite the OS/platform. Valid keys are cache, registry, links, completion.

{
    "storage" : {
         "packages" : "~/.bower/cache",
         "registry" : "~/.bower/registry"
         ... 
    }
}

Search button OR form

A bigger and more visible button (instead of just a link) for search page on http://bower.io/ would be nice.

It could also be a form, that submits to /search?q=keyword.

Add .bowerrc directory to the bower init process and store in bower.json

Hi,

To improve the flow of adding Bower to a solution can the dependency install directory be specified within the bower init process. I'd like to see the directory value from .bowerrc being integrated with the bower.json. One config file to rule them all. I may have missed something from the intended purpose of .bowerrc, perhaps in a larger set of nested solutions or the inheriting properties but for working on different projects with different standards it would be easier to have one process to create all the configuration needed.

Thanks,
Mike

Code font on GNU/Linux

The code font on bower's homepage has the following CSS:
pre, code { font-family: Consolas,Menlo,Courier,monospace; }
GNU/Linux users tend not to have Consolas (primarily Windows) or Menlo (primarily OS X) but do have Courier, but Courier is really ugly for code, both in my opinion and the opinion of many people that work with code. I think it would be better without the "Courier" and to leave monospace or replace it with a nicer font that generally comes with default GNU/Linux distributions, like Terminus or something. I was just browsing the site and this really stuck out to me lol.

Thanks!

SSL certificate for bower.io & subdomains

Would like to see the team's appetite to make things a little more secure. We can get a free cert from StartSSL, however it only allows 1 subdomain. We may need at least:

Also maybe this can be used for the CLI tool as well?

https-all-the-things-300x225

Broken anchor links on the homepage

It seems like anchor links aren't being inserted properly, linking AnchorLink instead of the actual link:
Homepage with broken AnchorLinks

It looks fine in most browsers though, for some reason.

IA / Website Redesign

Some suggested aims of this ticket:

  • Tighter branding
  • Better introduction to Bower and the actual problem it is solving.
  • Expose who is using Bower.
  • Expose who is supporting its development.
  • Point to a web interface for searching for packages.
  • Create distinct sections that can house API documentation overviews (not a replacement for the CLI help pages).
  • Example workflows (possibly including use of other tools).
  • Examples of well authored packages.
  • Other things? Fewer things?

It would be good to have all this done in the open, on GitHub. And to keep the site (and working on it) simple. I'm happy to help out as much as possible. Feel free to jump in with some thoughts.

cc @isaacdurazo


Draft site IA:

  • Home
    • What is Bower? Why should I care?
    • Who is using Bower?
  • Getting started
    • Installing Bower
    • Installing components
    • Basic use of .bowerrc
    • Finding components
  • Creating Bower packages
    • What is a Bower package? (e.g., should be small, focused).
    • Use of bower.json.
    • No-registration required for simple packages - GitHub shorthand.
    • Registering a Git endpoint for your package so it shows up for bower search.
    • Publishing assets directly to the Bower registry (why and how).
  • Advanced use
    • Setting up and referencing a private Bower registry (for companies).
    • Use of programmatic API.
  • Commands reference
  • Workflows
    • How can I use Bower with X?
    • Grunt
    • Require JS / AMD
  • Web site press kit area (For various logo downloads)
  • Bower badges (benschwarz.github.io/bower-badges)
  • FAQ
    • Windows Git gotcha (this could probably go under "Getting started"

Bower home page comments/issues

It's a great service to the developer community if tool originators present, up front, a concise and clear summary of what their tool is and does, so developers can quickly assess whether it's relevant to their field of work, and whether to invest further time learning it.

I think the Bower home page http://bower.io/ could use some refinement to that end. Here's a blow by blow commentary on me trying to get traction on what it says currently:

Bower A package manager for the web

Nice hook, but takes in pretty broad possibilities. We see that Bower has something to do with package management, and something to do with the web, which is a vast scope. We'll be needing more specifics...

Web sites are made of lots of things — frameworks, libraries, assets, utilities, and rainbows.

This description fits lots of items that run on the server, and on the browser; does Bower deal with all these? Is this saying Bower can "manage" any of Django, MySQL, jquery, or angular (as examples).

Bower manages all these things for you.

Well, it says "all", but I'm skeptical. From other reading, I'm pretty sure Bower actually doesn't manage things that run on the server, but perhaps I'm wrong. But now, what is the scope of "manage"?

Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you’re looking for.

Again, Bower claims to install, but "hunting, finding, downloading, saving" doesn't include "configuring". So still not sure what "install" means here.

From other reading, I get the impression that Bower doesn't have features to install anything to run locally. Instead, it marshals files ready for the server to deliver them to clients, which is where they actually run, or appear, etc. Maybe in some sphere of web development, that's called "installing", but readers with broader experience might not know that this is the limited definition intended.

And what is the scope of "all over"?

Bower keeps track of these packages in a manifest file, bower.json. So.... that's like a repo database or something? And there's just one bower.json for all packages?

How you use packages is up to you. This is meaningless as exposition of Bower. Clearly it's only "up to me" to choose among things that Bower facilitates. Which is what I'm here to find out, and was hoping that a sentence right about now would tell me.

Bower provides hooks to facilitate using packages in your tools and workflows. The hooks are for using the packages? Or is this trying to say that Bower has an API for using Bower to perform package-related tasks?

Bower is optimized for the front-end. Does this mean that sometimes Bower can be used for "installing" back-end things, but mostly it's for "installing" front-end components? Again, I'm pretty sure that Bower is for preparing delivery only of front-end components. So the "optimized" claim doesn't seem to add to the discussion, and only makes a muddled suggestion that maybe there are other less-optimized uses.

Bower uses a flat dependency tree, requiring only one version for each package, Does "flat dependency tree" bear somehow on "one version per package"? Or is this a non-sequitur? What does "flat dependency tree" even mean?

reducing page load to a minimum. Possibly "page load time"?

Install Bower
Bower is a command line utility. Install it with npm.
OK

**npm install -g bower

Bower requires Node and npm and Git.** These two lines are in reverse order that they are needed.

Getting started
Install packages
Install packages with bower install. Bower installs packages to bower_components/.

So, if components are "installed" to bower_components/ that suggests that "install" does not mean install for local use, right? So we infer that Bower's purpose is to gather files for delivery to the browser, and not at all for local use. But readers shouldn't have to reverse engineer this understanding, if indeed it's even true.

bower install A package can be a GitHub shorthand, a Git endpoint, a URL, and more. Read more about bower install

This is likely supposed to say that the argument can be any of those things, not that packages themselves can be these things.

Search packages
Search Bower packages and find the registered package names for your favorite projects.

This seems confusing. Earlier the narrative says Bower can get stuff from "all over". Yet here it introduces "Bower packages". Does Bower require that candidate packages be pre-cooked in some Bower-specific way? I'm pretty sure not, but then what does this mean?

Save packages Save your packages to bower.json with bower init.

Pretty sure that the packages are not saved to bower.json. I suspect only references to the package are saved to bower.json, while the packages themselves remain in bower_components. But, that's a guess.

Use packages
How you use packages is up to you.

Again, this is meaningless as exposition of Bower, and simply frustrates anyone who doesn't already know what Bower does.

Use Bower together with Grunt, RequireJS, Yeoman, and lots of other tools or build your own workflow with the API.

It's useful to know the ecosystem that Bower might work with, and it would be even better if the sentence let us know whether Bower would play a subsidiary role or a supervisory role to these other tools.

There you have it. There's a lot of ambiguity which I think could be ironed out to very good effect.

Namespacing / anti-squatting / dispute policy

We should have an official recommendation / policy for these. Let me know if this is ok and I'll submit a PR.

  • Namespacing - we don't support github style namespacing, however people are encouraged to namespace related modules with -. E.g. angular- or Polymer's paper-
  • Anti-squatting - I recommend we adopt npm's policy - publish code or move out of the way
  • Name transfer / IP & other disputes - try to work it out with the owner first, if no resolution, submit a ticket in the Bower Registry repo and the core team will sort it out

This should go into the Creating Package page.

Hope to be able to support multiple language environment

Provide a directory structure, volunteers will participate in.

Thanks.

请考虑支持多语言环境

只要提供目录结构即可,有自愿者会参与的。

感谢。

제 목록 구조 하 면 되 는 자원 봉사자 들이 참여 할 한 다.

감사 드 린 다.

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.