forked from chocolateboy/babel-plugin-source-map-support
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
39 lines (36 loc) · 1.07 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
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
babel: {
options: {
sourceMaps: 'inline',
nonStandard: false,
optional: [ 'strict' ],
stage: 0,
},
src: {
expand: true,
src: 'src/**/*.js',
dest: 'target',
},
test: {
options: {
plugins: [ 'babel-plugin-espower' ],
},
expand: true,
src: 'test/src/**/*.js',
dest: 'target',
}
},
clean: [ 'target' ],
mochaTest: {
src: 'target/test/src/**/*.js'
}
});
grunt.registerTask('compile:src', [ 'babel:src' ]);
grunt.registerTask('compile:test', [ 'babel:test' ]);
grunt.registerTask('compile', [ 'compile:src', 'compile:test' ]);
grunt.registerTask('test', [ 'compile', 'mochaTest' ]);
grunt.registerTask('default', [ 'test' ]);
};