-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGruntfile.js
55 lines (52 loc) · 1.47 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
53
54
55
/*
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
https://github.com/yahoo/es-dependency-graph/blob/master/LICENSE.md
*/
module.exports = function (grunt) {
grunt.initConfig({
transpile: {
main: {
type: 'cjs',
compatFix: true,
files: [{
expand: true,
cwd: 'lib/',
src: ['*.js'],
dest: 'build/'
}]
}
},
es6_module_wrap_default: {
options: {
type: 'cjs'
},
main: {
files: [{
expand: true,
cwd: 'build/',
src: ['*.js'],
dest: 'dist/'
}]
}
},
mochaTest: {
main: {
options: {
reporter: 'spec'
},
src: ['tests/*.js']
}
},
clean: {
main: ['build/', 'dist/']
}
});
grunt.loadNpmTasks('grunt-es6-module-transpiler');
grunt.loadNpmTasks('grunt-es6-module-wrap-default');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('build', ['clean', 'transpile', 'es6_module_wrap_default']);
grunt.registerTask('test', ['build', 'mochaTest']);
grunt.registerTask('default', ['build']);
};