This file contains 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
canvas |
This file contains 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
/** | |
* Paste your Gruntfile (or important parts of it) here | |
* | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
watch: { | |
options: { | |
livereload: true |
This file contains 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
copy: { | |
inplace: { | |
files: [{ | |
expand: true, | |
cwd: 'src', | |
src: '**/*.js', | |
dest: 'src' | |
}], | |
options: { | |
process: function(content, filepath) { |
This file contains 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) { | |
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' } | |
} |
This file contains 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 child = grunt.util.spawn({ cmd: 'node', args: ['something.js'] }); | |
child.stdout.pipe(fs.createWriteStream( 'myoutput.log' )); |
This file contains 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
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) ); |
This file contains 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
compass: { | |
build: { | |
options: { | |
config: 'config.rb' | |
}, | |
files: { | |
'build/www/_assets/css/index.css': ['source/www/_assets/scss/**/*.scss'] | |
} | |
} | |
} |
This file contains 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) { | |
grunt.initConfig({ | |
stylus: { | |
my_stylus: { | |
files: { | |
'dist/index.css': [ | |
'index.styl' | |
] | |
} | |
} |
This file contains 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
# 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. |