/
Gruntfile.js
60 lines (50 loc) · 1.3 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
56
57
58
59
60
/*
* grunt-traceur
* https://github.com/aaron/grunt
*
* Copyright (c) 2013 Aaron Frost
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Configuration to be run (and then tested).
traceur: {
options: {
experimental: true,
modules: 'commonjs',
sourceMaps: true,
arrayComprehension: true,
generatorComprehension: true,
moduleNaming: {
addPrefix: "test/fixtures",
stripPrefix: "test/tmp"
},
copyRuntime: "test/tmp"
// traceur options here
},
test: {
files: [{
expand: true,
cwd: 'test/fixtures',
src: ['*.js'],
dest: 'test/tmp'
}]
}
},
nodeunit: {
tests: ['test/*_test.js']
},
clean: {
build: ["test/tmp"]
}
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['clean:build', 'traceur', 'nodeunit', 'clean:build']);
//Same as default, but doesn't clean at the end, so that you can see the output.
grunt.registerTask('test', ['clean:build', 'traceur', 'nodeunit']);
};