gear
Version:
Gear.js - Build System for Node.js and the Browser
69 lines (51 loc) • 1.85 kB
Markdown
Gear.js is an easy to use, simple to extend, and powerful build system. Chain tasks together to build projects with ease.
Features:
* Basic building blocks that can be combined to perform complex builds.
* Tasks are simply defined and keep system internals to a minimum.
* Asynchronous execution.
* Extensible task loading via NPM, file, or directory.
* Advanced flow control for complex task execution.
* Runs in Node.js and the browser.
[](http://travis-ci.org/twobit/gear)
[](https://nodei.co/npm/gear/)
To get the most out of Gear.js, you will want to install [gear-lib](http://github.com/yahoo/gear-lib) which contains tasks for linting, minifying, and deploying JS/CSS assets.
```bash
$ npm install gear gear-lib
```
```javascript
new Queue()
.read('foo.js')
.log('read foo.js')
.inspect()
.write('foobarbaz.js')
.run();
```
```javascript
new Queue()
.read(['foo.js', {name: 'bar.js'}, 'baz.js'])
.log('read foo.js')
.inspect()
.write(['newfoo.js', 'newbar.js']) // Not writing 'baz.js'
.run();
```
```javascript
new Queue()
.read('foo.js')
.log('Parallel Tasks')
.tasks({
read: {task: ['read', ['foo.js', 'bar.js', 'baz.js']]},
combine: {requires: 'read', task: 'concat'},
minify: {requires: 'combine', task: 'jsminify'},
print: {requires: 'minify', task: 'inspect'}, // Runs when read, combine, and minify complete
parallel: {task: ['log', "Hello Gear.js world!"]} // Run parallel to read
}).run();
```
* [Documentation](http://gearjs.org)
* [Issues](http://github.com/yahoo/gear/issues)