0.4.0 • Published 10 years ago

borrower v0.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Borrower

Gitter Build Status Dependency Status

Forget complexity of Require.js config, don't worry about running Bower install.

Note: this project is a work in progress.

The goal is to keep a single configuration file and a working enviromnemnt with a single install command.

Usage

$ npm install borrower --save

$ node_modules/.bin/borrower install jquery --save

It will install Bower Components in static_modules/ and save dependency in package.json.

html

<script data-main="app.js" src="static_modules/require.js"></script>

Require.js is configured, you can just focus on your Javascript.

That's all folks !

Configuration

package.json

{
    ...
    staticDependencies: [...],
    ...
    config: {
        bower: {
            directory: 'static_modules',  // name of the folfder containing dependencies
            cwd: '',                      // where static modules must be installed
            baseUrl: ''                   // location of the ducoment root
                                          // an absolute path from this location will be used in requirejs config
                                          // if empty, a relative path will be used
        }
    }
}

Configurations from .bowerrc are available in package.json > config > bower

express static example: ...

How it works

$ borrower init

It will register a npm postinstall hook in your package.json to run Bower and configure Require on every npm install.

Require.js is configured inside static_modules/require.js and updated at each install run.

0.4.0

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago