Gear.js

Download

Task-Based Build System

Gear.js is a scriptable build system using simple tasks that act like a sequence of piped commands.

Features include:

Installation

Node

To get the most out of Gear.js install gear-lib which contains tasks for linting, minifying, and deploying JS/CSS assets.

$ npm install gear
$ npm install gear-lib
Browser
<script type="text/javascript" src="https://github.com/yahoo/gear-lib/raw/master/build/gear-lib.js"></script>
<script type="text/javascript" src="https://github.com/yahoo/gear/raw/master/build/gear.js"></script>

load()

Loads blobs from different sources.

Arguments

sources - List of sources.

new Queue()
    .load(files)
    .run(function(err, results) {
        console.log(('' + results[0]).length + ' characters');
    });

tasks()

new Queue()
    .load(files)
    .tasks({
        dev: {task: ['write', 'output.js']},
        prodmin: {task: 'jsminify'},
        prod: {requires: 'prodmin', task: ['write', 'output.min.js']},
        join: {requires: ['dev', 'prod']}
    })
    .run(function(err, results) {
        console.log(results);
    });