-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
41 lines (36 loc) · 970 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
react: {
files: {
expand: true,
cwd: 'backend/views',
src: ['**/*.jsx'],
dest: 'backend/views',
ext: '.js'
}
},
watch: {
react: {
files: 'backend/views/*.jsx',
tasks: ['react']
}
},
browserify: {
options: {
transform: [ require('grunt-react').browserify ]
},
client: {
src: ['backend/views/**/*.jsx'],
dest: 'scripts/app.built.js'
}
}
});
grunt.loadNpmTasks('grunt-react');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', [
'react',
'watch'
]);
};