-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
52 lines (42 loc) · 1.24 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (C) 2014-2016, 12 Quarters Consulting
// All rights reserved.
// Redistribution and use are permitted under the modified BSD license
// available at https://raw.githubusercontent.com/MaxMotovilov/ipl.js/master/LICENSE
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp/*'],
},
// Configuration to be run (and then tested).
ipl: {
test: {
options: {
include: "node_modules/ipl/test/include",
env: require( "ipl/test/env" )
},
files: [ {
expand: true,
flatten: true,
src: "node_modules/ipl/test/in/*",
dest: "tmp/"
} ]
}
},
// Unit tests.
nodeunit: {
tests: ['test/*_test.js'],
},
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['clean', 'ipl', 'nodeunit']);
grunt.registerTask('default', ['test']);
};