rakuten-frontend / bower-browser

GUI Bower manager runs on web browser
MIT License
132 stars 14 forks source link

bower-browser

GUI Bower manager runs on web browser

NPM Version Build Status Dependency Status

bower-browser

Features

Features

Installation

Install via npm.

$ npm install -g bower-browser

Install with -g option for command line interface, --save or --save-dev for using module API.
Grunt plugin is also available.

Requirements

bower-browser executes bower in background.
Make sure to install Bower if you haven't: $ npm install -g bower

Usage

$ cd path/to/your-project
$ bower-browser

Then, web browser will open http://localhost:3010 automatically.
Manage your Bower components in the web GUI! :-)

CLI Options

Integration with Build Systems

Gulp

Use bower-browser module directly.

var bowerBrowser = require('bower-browser');

gulp.task('bower-browser', function () {
  bowerBrowser({
    // Options here.
  });
});

// Alias for running preview server and bower-browser at the same time.
gulp.task('serve', ['connect', 'bower-browser', 'watch'], function () {
  // ...
});

Grunt

Use grunt-bower-browser plugin.

API

Quick Start

// Run bower-browser using default config.
require('bower-browser')();

Advanced

var bowerBrowser = require('bower-browser');

// Start app with options you like.
var app = bowerBrowser({
  path: 'path/to/project',  // Location of bower.json. default: null (use process.cwd())
  port: 8080,               // Port number. default: 3010
  cache: 0,                 // Cache TTL. Set 0 to force to fetch API. default: 86400 (24hrs)
  open: false,              // Prevent opening browser. default: true (open automatically)
  silent: true              // Print nothing to stdout. default: false
});

// Events
app.on('start', function () {
  console.log('Started bower-browser!');
});

// Methods
app.close();

NOTE: Events and methods are experimental for now. They might be updated.

Events

Methods

License

Copyright (c) 2014-2015 Rakuten, Inc. Licensed under the MIT License.