d3-helpers
Version:
Little utility D3 functions
79 lines (68 loc) • 1.49 kB
JavaScript
/* global module */
module.exports = function (grunt) {
module.require('time-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'nice-package': {
all: {
options: {
blankLine: true
}
}
},
jshint: {
'options': {
jshintrc: '.jshintrc'
},
default: {
'src': [ '*.js', 'test/*.js' ]
}
},
sync: {
all: {
options: {
sync: ['author', 'name', 'version',
'private', 'license', 'keywords', 'homepage'],
}
}
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/*.js']
}
},
'clean-console': {
all: {
options: {
url: ['index.html'],
timeout: 1
}
}
},
karma: {
unit: {
configFile: 'karma.conf.js',
background: false,
singleRun: true,
logLevel: 'INFO',
browsers: ['PhantomJS']
}
},
watch: {
options: {
atBegin: true
},
all: {
files: ['*.js', 'test/*.js', 'index.html'],
tasks: ['jshint', 'test']
}
}
});
var plugins = module.require('matchdep').filterDev('grunt-*');
plugins.forEach(grunt.loadNpmTasks);
grunt.registerTask('test', ['mochaTest', 'karma', 'clean-console']);
grunt.registerTask('default', ['deps-ok', 'nice-package', 'sync', 'jshint', 'test']);
};