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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
meta: grunt.file.readJSON('package.json'), | |
uglify: { | |
options: { | |
banner: '/*! <%= meta.name %> - v<%= meta.version %> */\n', | |
}, | |
dist: { | |
src: 'src/<%= meta.name %>.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
/* | |
* yaml-indent-documents | |
* | |
* Copyright (c) 2012 "Cowboy" Ben Alman | |
* Licensed under the MIT license. | |
* http://benalman.com/about/license/ | |
*/ | |
'use strict'; |
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 stringify = function(obj, prop) { | |
var placeholder = '____PLACEHOLDER____'; | |
var fns = []; | |
var json = JSON.stringify(obj, function(key, value) { | |
if (typeof value === 'function') { | |
fns.push(value); | |
return placeholder; | |
} | |
return value; | |
}, 2); |
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 isPrimitive = function(val) { | |
return val !== function() { return this; }.call(val); | |
}; |
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'); | |
// Init config | |
exports.config = { | |
awesome: { | |
target1: {src: ['foo.js', 'bar.js']} | |
} | |
}; | |
// Initialize task object |
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 = {}; | |
// http://twitter.com/cowboy/status/247745191287611392 | |
var isObject = function(val) { | |
return val === function() { return this; }.call(val); | |
}; | |
var config = function(prop, val) { | |
var method = arguments.length === 2 ? 'set' : 'get'; | |
return config.__proto__[method].apply(null, arguments); |
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
// inside a gruntfile | |
grunt.registerTask('awesome', { | |
description: 'The most awesome task ever.', | |
type: 'multi', | |
main: function(grunt, arg) { | |
var files = grunt.file.expandFiles(grunt.util._.pluck(this.files, 'src')); | |
var success = this.task.listFiles(grunt, files); | |
grunt.log.writeln('Stuff happened...'); | |
if (success) { grunt.log.ok(); } else { grunt.log.error(); } | |
}, |
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
[09:09] <@rmill> o/\o | |
[09:09] <@rmill> common abbreviation for "boo-yah" | |
[09:10] <@rmill> _o/\o_ | |
[09:10] <@ben_alman> ?hi5 rmill | |
[09:10] <bot-t> ben_alman, Couldn't find "hi5 rmill" in jQuery Docs. | |
[09:10] <@ben_alman> FINE | |
[09:10] <@rmill> :'( | |
[09:10] <@ben_alman> ?eval hi5(" rmill ben_alman ") | |
[09:10] <bot-t> ben_alman: " rmill ben_alman " | |
[09:10] <@ben_alman> o well |
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
$ npm_update | |
Installing @latest version of all dependencies... | |
npm http GET https://registry.npmjs.org/colors | |
npm http GET https://registry.npmjs.org/coffee-script | |
npm http GET https://registry.npmjs.org/dateformat | |
npm http GET https://registry.npmjs.org/async | |
npm http GET https://registry.npmjs.org/glob-whatev | |
npm http GET https://registry.npmjs.org/connect | |
npm http GET https://registry.npmjs.org/hooker | |
npm http GET https://registry.npmjs.org/nopt |
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
/* | |
* Abstraction.js "Lite" | |
* | |
* Copyright (c) 2012 "Cowboy" Ben Alman | |
* Licensed under the MIT license. | |
* http://benalman.com/about/license/ | |
*/ | |
var $elseif, $else; | |
var $if = function(state) { |