Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Bower is a package manager for Javascript libraries that allows you to define, version, and retrieve your dependencies. This project allows use of Bower from Drush. It's using BowerPHP instead of the node.js version.

The idea for this project is stolen from Composer.

Installation

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/hipnaba/2592355.git ~/.drush/tiara_bower

Installing BowerPHP

The project uses BowerPHP installed via Composer. It's not included in the project itself so it needs to be installed separately. There are 2 way of doing that.

Automatically

Tiara Bower will check for Composer and use it to install BowerPHP. If Composer is not installed it will download it first.

hipnaba@azeroth:~$ drush tiara-bower
BowerPHP not installed. Do you want to install it via composer? (y/n): y
Composer not installed. Do you want to download it? (y/n): y
Project composer (8.x-1.x-dev) downloaded to                         [success]
/home/hipnaba/.drush/composer.
Project composer contains 0 modules: .
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing vierbergenlars/php-semver (3.0.1)
    Loading from cache
  ...

Manually

Run `composer install` inside Tiara Bower's directory.

hipnaba@azeroth:~$ cd ~/.drush/tiara_bower
hipnaba@azeroth:~/.drush/tiara_bower$ composer install

Usage

Tiara bower also registers 2 aliases `tb` and `bower`.

drush bower
List all available Bower commands.
drush bower install
Parses bower.json and installs all dependencies.
drush bower init
Walk through a wizard to create your own bower.json file.
drush bower install bootstrap
Downloads Bootstrap and all it's dependencies.

Example

The following is an example of a bower.json file that will download the latest in the 2.* branch of jQuery...

{
    "name": "my-project",
    "dependencies": {
        "jquery": "2.*"
    }
}

See bower.io for a repository of available packages to install and depend on.

Project information