local-version
Version:
A "package.json" version number fetcher for local Node module installations. Async and sync.
44 lines (37 loc) • 987 B
JavaScript
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: true
},
all: ['Gruntfile.js', 'lib/**/*.js', '<%= nodeunit.files %>']
},
nodeunit: {
files: ['test/**/*_test.js'],
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'nodeunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'nodeunit']
},
},
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task.
grunt.registerTask('default', ['jshint', 'nodeunit']);
// Travis CI task.
grunt.registerTask('travis', ['jshint', 'nodeunit']);
};