GitXplorerGitXplorer
j

bish

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
7c7de3bab6342d9b4c9ffb92808b8715feda1eff

+travis.yml

jjbt committed 9 years ago
Unverified
3f37f5168cd2899230e554b1efde55f0df39eed4

+license. Closes #1

jjbt committed 9 years ago
Unverified
b1542a8aa740eff0cc87fad42cedd5d15529d149

Nicer test with npm test

jjbt committed 9 years ago
Unverified
cb0c0df07e4343ee284aae8ae138b2c03df17c90

Create LICENSE

jjbt committed 9 years ago
Unverified
6bb46c2f3559ca4612d6d4914ca46a1e4870bd14

0.0.10

jjbt committed 10 years ago
Unverified
3fa801cc519c7082b4c6822c7e1700b9a164f6ce

Support for less >= 2 in default transformer

jjbt committed 10 years ago

README

The README file for this repository.

Bish

Super-tiny asset (javascript) concatenation and dependencies, à la smash.

Installation

npm install bish

Usage

foo.js

import "bar.js"

alert('bye');

bar.js

alert('hi');

Then:

var bish = require('bish', { /* optional options */ });

bish('path/to/foo.js'); // "alert('hi');\n\nalert('bye');"

### Command-line

$ npm install -g bish
$ bish path/to/foo.js > baz.js

Other features

  • Require directory: import "dir"; to include all files in a directory (recursively) in order
  • Transformers: see below
  • List deps: bish.deps('file.js'); - lists all files included in file.js
  • Require paths: specify paths: [ 'path1', 'path2' ] in options

Transformers

You may want to transform some files based on their extension, for example LESS to CSS.

Usage: bish('file.ext', { transformers: { ext: transformFn } });

transformFn is called with arguments (fileContents, relativePath, fullPath) where relativePath is relative to the root dir (root in options object), and fullPath is the full file path.