-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
111 lines (94 loc) · 1.97 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
// Client App
browserify: {
options: {
transform: ['reactify'],
browserifyOptions: {
extensions: ['.jsx', '.react.jsx'],
debug: true
}
},
production: {
options: {
debug: false,
},
files: {
'dist/js/main.js': ['src/js/main.jsx']
}
},
development: {
options: {
debug: true,
},
files: {
'dist/js/main.js': ['src/js/main.jsx']
}
},
gruntfile: {
files: ['Gruntfile.js']
}
},
sass: {
development: {
options: {
style: 'expanded'
},
files: {
'dist/css/main.css': 'src/css/main.scss'
}
},
production: {
files: {
'dist/css/main.css': 'src/css/main.scss'
}
}
},
watch: {
options: {
spawn: false,
interrupt: true
},
js: {
files: ['src/**/*.js', 'src/**/*.react.jsx', 'src/**/*.jsx'],
tasks: ['browserify:development']
},
scss: {
files: ['src/**/*.scss'],
tasks: ['sass:development']
},
gruntfile: {
files: ['Gruntfile.js']
},
livereload: {
options: {
livereload: 35728,
},
files: [
'dist/**/*.js',
'dist/**/*.css'
]
},
},
copy: {
dist: {
files: [{
'dist/img/webdriverio.png': ['src/img/webdriverio.png'],
}, {
expand: true,
dot: true,
cwd: 'src/',
dest: 'dist/',
src: [
'*.{ico,png}',
'index.html',
]
}]
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('build', ['copy', 'sass:development', 'browserify:development']);
grunt.registerTask('default', ['build', 'watch']);
};