Gear.js is a scriptable build system using simple tasks that act like a sequence of piped commands.
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
<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>
Loads blobs from different sources.
sources - List of sources.
new Queue()
.read(files)
.run(function(err, results) {
console.log(('' + results[0]).length + ' characters');
});
new Queue()
.read(files)
.tasks({
dev: {task: ['write', 'output.js']},
prodmin: {task: 'jsminify'},
prod: {requires: 'prodmin', task: ['write', 'output.min.js']},
join: {requires: ['dev', 'prod']}
})
.run(function() {
console.log('output.js - ' + localStorage['output.js'].length);
console.log('output.min.js - ' + localStorage['output.min.js'].length);
});