UNPKG

1.21 kBJavaScriptView Raw
1/*
2 * grunt-deps-ok
3 * https://github.com/bahmutov/grunt-deps-ok
4 *
5 * Copyright (c) 2013 Gleb Bahmutov
6 * Licensed under the MIT license.
7 */
8
9'use strict';
10
11module.exports = function(grunt) {
12
13 // Project configuration.
14 grunt.initConfig({
15 jshint: {
16 all: [
17 'Gruntfile.js',
18 'tasks/*.js',
19 '<%= nodeunit.tests %>',
20 ],
21 options: {
22 jshintrc: '.jshintrc',
23 },
24 },
25
26 // Before generating any new files, remove any previously-created files.
27 clean: {
28 tests: ['tmp'],
29 },
30
31 // Unit tests.
32 nodeunit: {
33 tests: ['test/*_test.js'],
34 },
35
36 });
37
38 // Actually load this plugin's task(s).
39 grunt.loadTasks('tasks');
40
41 // These plugins provide necessary tasks.
42 grunt.loadNpmTasks('grunt-contrib-jshint');
43 grunt.loadNpmTasks('grunt-contrib-clean');
44 grunt.loadNpmTasks('grunt-contrib-nodeunit');
45 grunt.loadNpmTasks('grunt-bump');
46
47 // Whenever the "test" task is run, first clean the "tmp" dir, then run this
48 // plugin's task(s), then test the result.
49 grunt.registerTask('test', ['clean', 'deps-ok', 'nodeunit']);
50
51 // By default, lint and run all tests.
52 grunt.registerTask('default', ['jshint', 'test']);
53
54};