forked from yeoman/grunt-usemin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
37 lines (34 loc) · 812 Bytes
/
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
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'lib/*.js',
'tasks/*.js',
'test/**/*.js',
'!test/temp/scripts/*.js',
]
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadTasks('tasks');
grunt.registerTask('test', 'Run tests', function () {
var done = this.async();
var spawnOpts = {
cmd: 'node_modules/mocha/bin/mocha',
args: grunt.file.expand('test/test-*.js')
};
grunt.util.spawn(spawnOpts, function (err, res, code) {
grunt.log.write(res.stdout);
if (code) {
throw res.stderr;
}
done();
});
});
grunt.registerTask('default', ['jshint', 'test']);
};