game-of-life-d3-boots
Version:
conway's game of life with a small bit of interactivity. an observer can click on a square to "infect" it (turn its living color to red). then, whenever that cell is live, it will "infect" its living neighbors
78 lines (74 loc) • 2.09 kB
JavaScript
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
browserify: {
dist: {
files: {
'dist/<%= pkg.name %>.js': ['lib/**/*.js'],
},
}
},
uglify: {
dist: {
src: 'dist/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.min.js'
}
},
// jshint: {
// options: {
// curly: true,
// eqeqeq: true,
// immed: true,
// latedef: true,
// newcap: true,
// noarg: true,
// sub: true,
// undef: true,
// unused: true,
// boss: true,
// eqnull: true,
// browser: true,
// globals: {
// jQuery: true
// }
// },
// gruntfile: {
// src: 'Gruntfile.js'
// },
// lib_test: {
// src: ['lib/**/*.js', 'test/**/*.js']
// }
// },
// qunit: {
// files: ['test/**/*.html']
// },
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib_test: {
files: '<%= jshint.lib_test.src %>',
tasks: ['jshint:lib_test', 'qunit']
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task.
grunt.registerTask('default', [ 'browserify', 'uglify']);
grunt.registerTask('quick', [ 'browserify']);
};