-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
48 lines (45 loc) · 1.06 KB
/
Copy pathgruntfile.js
File metadata and controls
48 lines (45 loc) · 1.06 KB
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
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
options: {
esversion: 6,
}
},
babel: {
options: {
sourceMap: true
},
dist: {
files: [{
expand: true,
cwd: 'src/',
src: ['**/*.js'],
dest: 'lib/'
}]
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
captureFile: 'build/results.txt',
quiet: false,
clearRequireCache: false,
require: [
'babel-core/register',
'source-map-support/register'
]
},
src: ['test/**/*.js']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('verify', ['jshint']);
grunt.registerTask('compile', ['verify', 'babel']);
grunt.registerTask('test', ['compile', 'mochaTest']);
grunt.registerTask('default', ['test']);
};