123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /*
- * grunt-lib-contrib
- * http://gruntjs.com/
- *
- * Copyright (c) 2012 Tyler Kellen, contributors
- * Licensed under the MIT license.
- */
- module.exports = function(grunt) {
- 'use strict';
- // Project configuration.
- grunt.initConfig({
- jshint: {
- all: [
- 'Gruntfile.js',
- 'lib/*.js',
- '<%= nodeunit.tests %>'
- ],
- options: {
- jshintrc: '.jshintrc'
- }
- },
- test_vars: {
- source: 'source/'
- },
- test_task: {
- options: {
- param: 'task',
- param2: 'task',
- template: '<%= test_vars.source %>',
- data: {
- template: ['<%= test_vars.source %>']
- }
- },
- target: {
- options: {
- param: 'target'
- }
- }
- },
- // Unit tests.
- nodeunit: {
- tests: ['test/*_test.js']
- }
- });
- // These plugins provide necessary tasks.
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-contrib-nodeunit');
- // Whenever the "test" task is run, then test the result.
- grunt.registerTask('test', ['nodeunit']);
- // By default, lint and run all tests.
- grunt.registerTask('default', ['jshint', 'test']);
- };
|