-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.js
42 lines (38 loc) · 928 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
38
39
40
41
42
module.exports = function(grunt) {
grunt.initConfig({
react: {
dynamic_mappings: {
files: [
{
expand: true,
cwd: "example/jsx",
src: ["**/*.jsx"],
dest: "example/components",
ext: ".js"
}
]
}
},
mocha: {
options: {
reporter: 'Nyan', // Duh!
run: true
}
},
watch: {
react: {
files: ["example/jsx/**/*.jsx"],
tasks: ["react"]
}
}
});
grunt.loadNpmTasks("grunt-react");
grunt.loadNpmTasks("grunt-mocha");
grunt.registerTask("test", "Run Mocha tests.", function() {
// If not --test option is specified, run all tests.
var test_case = grunt.option("test") || "**/*";
grunt.config.set("mocha.browser", ["test/" + test_case + ".html"]);
grunt.task.run("mocha");
});
grunt.loadNpmTasks("grunt-contrib-watch");
};