123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 'use strict';
- module.exports = function(grunt) {
-
- grunt.initConfig({
- jshint: {
- all: [
- 'Gruntfile.js',
- 'tasks/*.js',
- '<%= nodeunit.tests %>'
- ],
- options: {
- jshintrc: '.jshintrc'
- },
- },
-
- clean: {
- short: ['tmp/sample_short'],
- long: {
- src: ['tmp/sample_long'],
- },
- },
-
- nodeunit: {
- tests: ['test/*_test.js'],
- },
- });
-
- grunt.loadTasks('tasks');
-
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-contrib-nodeunit');
- grunt.loadNpmTasks('grunt-contrib-internal');
-
- grunt.registerTask('copy', 'Copy fixtures to a temp location.', function() {
- grunt.file.copy('test/fixtures/sample_long/long.txt', 'tmp/sample_long/long.txt');
- grunt.file.copy('test/fixtures/sample_short/short.txt', 'tmp/sample_short/short.txt');
- });
-
-
- grunt.registerTask('test', ['copy', 'clean', 'nodeunit']);
-
- grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
- };
|