This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.initConfig({ | |
db: { | |
// Books will be populated when setfromdb is ran | |
books: [] | |
}, | |
other: { | |
target: { | |
options: { | |
// Now when other:target is ran it will consume db.books | |
books: '<%= db.books %>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\Office\Documents\www\node-exit>grunt nodeunit | |
Running "nodeunit:files" (nodeunit) task | |
Testing exit_test.jsF..F | |
>> exit - stdout stderr | |
>> Message: node log.js 0 1000 stdout stderr | |
>> Error: true == '**UNEXPECTED** [stderr] testing 10\n**UNEXPECTED** [stderr] testing 11\n**EXPECTED** [stderr] testing 10\n**UNEXPECTED** [stderr] testing 12\n**EXPECTED** [stderr] testing 11\n**UNE | |
XPECTED** [stderr] testing 13\n**EXPECTED** [stderr] testing 12\n**UNEXPECTED** [stderr] testing 14\n**EXPECTED** [stderr] testing 13\n**UNEXPECTED** [stderr] testing 15\n**EXPECTED** [stderr] testing | |
14\n**UNEXPECTED** [stderr] testing 16\n**EXPECTED** [stderr] testing 15\n**UNEXPECTED** [stderr] testing 17\n**EXPECTED** [stderr] testing 16\n**UNEXPECTED** [stderr] testing 18\n**EXPECTED** [stder | |
r] testing 17\n**UNEXPECTED** [stderr] testing 19\n**EXPECTED** [stderr] testing 18\n**UNEXPECTED** [stderr] testing 20\n**EXPECTED** [stderr] testing 19\n**UNEXPECTED** [stderr] testing 21\n**EXPECTE | |
D** [stderr] testing 20\n**UNE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var grunt = require('grunt'); | |
// hack to avoid loading a Gruntfile | |
// You can skip this and just use a Gruntfile instead | |
grunt.task.init = function() {}; | |
// Init config | |
grunt.initConfig({ | |
jshint: { | |
all: ['index.js'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cb = log.format({ | |
message: 'this\nis\na\ntest\n', | |
indent: 1, | |
format: function(line, pad) { | |
return util.format($.cyan('info') + $.gray(' %s') + '%s', pad, line) + (Array(20 - line.length).join('~')); | |
} | |
}); | |
console.log(cb); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createTala = require('./') | |
var shell = require('gl-now')() | |
var createShader = require('gl-shader') | |
var createBuffer = require('gl-buffer') | |
var fs = require('fs') | |
var createSimpleShader = require('simple-2d-shader') | |
var tile2d = require('./lib/tile2d') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function crossprod(a, b) { | |
return [ | |
(a[1] * b[2]) - (a[2] * b[1]), | |
(a[2] * b[0]) - (a[0] * b[2]), | |
(a[0] * b[1]) - (a[1] * b[0]) | |
] | |
} | |
function subvec(a, b) { | |
return [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run with: grunt switchwatch:target1:target2 to only watch those targets | |
grunt.registerTask('switchwatch', function() { | |
var targets = Array.prototype.slice.call(arguments, 0); | |
Object.keys(grunt.config('watch')).filter(function(target) { | |
return !(grunt.util._.indexOf(targets, target) !== -1); | |
}).forEach(function(target) { | |
grunt.log.writeln('Ignoring ' + target + '...'); | |
grunt.config(['watch', target], {files: []}); | |
}); | |
grunt.task.run('watch'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var master = new (webkitAudioContext || AudioContext) | |
var jsynth = require('jsynth') | |
var tune = require('tune') | |
var ff = []; | |
[ | |
'C D E G', | |
'A B C E', | |
'C D E G', | |
'A B C E', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = webkitAudioContext || AudioContext | |
var master = new context() | |
var jsynth = require('jsynth') | |
var tune = require('tune') | |
var ff = []; | |
[ | |
'C D E G', | |
'A B C E', | |
'C D E G', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var through = require('through'); | |
var split = require('split'); | |
var a = through(function write(data) { | |
// We handle the data internally here | |
this.queue('line: ' + data + '\n'); | |
}); | |
a.pipe(process.stdout); | |
var exposed = through(); |