Skip to content

Instantly share code, notes, and snippets.

View mzgoddard's full-sized avatar

Z Goddard mzgoddard

  • Bocoup
  • Boston, MA
View GitHub Profile
@mzgoddard
mzgoddard / index.jade
Created June 29, 2014 08:37
A Pen by Michael "Z" Goddard.
canvas
/**
* Paste your Gruntfile (or important parts of it) here
*
*/
module.exports = function(grunt) {
grunt.initConfig({
watch: {
options: {
livereload: true
copy: {
inplace: {
files: [{
expand: true,
cwd: 'src',
src: '**/*.js',
dest: 'src'
}],
options: {
process: function(content, filepath) {
module.exports = function(grunt) {
grunt.initConfig({
image_resize: {
options: { width: 16, height: 16, overwrite: true, upscale: true, crop: true },
your_target: { 'www/assets/icon.png':'www/assets/icon16.png' },
your_target_36: {
options: { width: 36, height: 36 },
files: { 'www/assets/icon.png':'www/assets/icon36.png' }
}
var child = grunt.util.spawn({ cmd: 'node', args: ['something.js'] });
child.stdout.pipe(fs.createWriteStream( 'myoutput.log' ));
clean: {
// remove files and folders in build dir but ignore mp3s
build: {
src: [ 'build/**/*' ],
filter: function(filepath) {
if (grunt.file.isDir(filepath)) {
var match = 'build/www/_assets/mp3'.match(filepath);
return !( match && match.index === 0 );
}
return !( /\.mp3$/.test(filepath) );
compass: {
build: {
options: {
config: 'config.rb'
},
files: {
'build/www/_assets/css/index.css': ['source/www/_assets/scss/**/*.scss']
}
}
}
module.exports = function(grunt) {
grunt.initConfig({
stylus: {
my_stylus: {
files: {
'dist/index.css': [
'index.styl'
]
}
}
@mzgoddard
mzgoddard / example.toml
Last active July 24, 2020 16:36
TOML Grammers
# A TOML example. Unlike JSON it supports comments.
[player]
particles = [
[ 0.0, -5.0 ],
[ 4.330127018922194, -2.4999999999999996 ],
[ -4.330127018922194, -2.4999999999999996 ]
]
# Unlike YAML, there is only one way to write arrays.
# There is only one way to write tables too.
# This reduces implementation complexity for a TOML parser.