-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
104 lines (93 loc) · 3.01 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
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
clean: {
frontend: {
src: ['frontend/**/*.*']
}
},
babel: {
options: {
sourceMap: true,
presets: ['babel-preset-es2015']
},
dist: {
files: {
'frontend/js/app-complete.js': 'frontend/js/app-complete.js'
}
}
},
concat: {
options: {
separator: '\n\n\n'
},
frontend: {
files: {
'frontend/js/libraries.js': [
'node_modules/jquery/dist/jquery.js',
'node_modules/angular/angular.js',
'node_modules/angular-resource/angular-resource.min.js',
'node_modules/angular-socket-io/socket.js',
'node_modules/moment/moment.js',
'node_modules/moment/locale/de.js',
'node_modules/rx/dist/rx.all.js',
'node_modules/rx-angular/dist/rx.angular.js',
'frontend-src/js/lib/skycons.js',
'node_modules/socket.io-client/socket.io.js'
],
'frontend/js/app-complete.js': [
'frontend-src/js/app.js',
'frontend-src/js/**/*.js'
]
}
}
},
sass: {
options: {
style: 'expanded',
precision: 8,
includePaths: ['node_modules/bootstrap-sass/assets/stylesheets/'],
sourceMap: true
},
frontend: {
files: {
'frontend/css/bootstrap.css': ['frontend-src/css/bootstrap.scss'],
'frontend/css/style.css': ['frontend-src/css/style.scss']
}
}
},
copy: {
frontend: {
files: [
{
expand: true,
cwd: 'frontend-src',
src: ['**/*.html', 'fonts/*.*', 'img/*.*', 'css/*.css'],
dest: 'frontend/'
}
]
}
},
watch: {
options: {
spawn: false,
livereload: true
},
css: {
files: ['frontend-src/css/**/*.*'],
tasks: ['sass']
},
js: {
files: ['frontend-src/js/**/*.*'],
tasks: ['concat','babel']
},
html: {
files: ['frontend-src/**/*.html'],
tasks: ['copy']
}
}
});
// Default task(s).
grunt.registerTask('default', ['clean', 'concat', 'sass', 'copy', 'babel']);
};