-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
124 lines (114 loc) · 3.46 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
112
113
114
115
116
117
118
119
120
121
122
123
124
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['bower_components/foundation/scss']
},
dist: {
options: {
outputStyle: 'compressed',
sourceMap: true,
},
files: {
'tmp/sass.css': 'scss/app.scss'
}
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'css/app.css': ['tmp/sass.css', 'bower_components/chosen/chosen.min.css']
}
}
},
copy: {
main: {
files: [
{expand: true, flatten: true, src: ['bower_components/chosen/*.png'], dest: 'css/', filter: 'isFile'},
],
},
},
concat: {
options: {
banner: "/* Kanboard Javascript File */\n",
sourceMap: true,
separator: ";\n"
},
dist: {
src: ['bower_components/modernizr/modernizr.js',
'bower_components/jquery/dist/jquery.js',
'bower_components/foundation/js/foundation.js',
'bower_components/list.js/dist/list.js',
'bower_components/chosen/chosen.jquery.min.js',
'jssrc/src/base.js',
'jssrc/src/board.js',
'jssrc/src/calendar.js',
'jssrc/src/analytic.js',
'jssrc/src/swimlane.js',
'jssrc/src/dashboard.js',
'jssrc/src/budget.js',
'jssrc/src/screenshot.js',
'bower_components/jquery-ui/jquery-ui.js',
'bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.js',
'bower_components/list.js/dist/list.js',
'bower_components/moment/moment.js',
'bower_components/fullcalendar/dist/fullcalendar.js',
'jssrc/vendor/mousetrap.min.js',
'jssrc/vendor/mousetrap-global-bind.min.js',
'jssrc/vendor/lang/da.js',
'jssrc/vendor/lang/de.js',
'jssrc/vendor/lang/es.js',
'jssrc/vendor/lang/fi.js',
'jssrc/vendor/lang/fr.js',
'jssrc/vendor/lang/hu.js',
'jssrc/vendor/lang/it.js',
'jssrc/vendor/lang/ja.js',
'jssrc/vendor/lang/nl.js',
'jssrc/vendor/lang/pl.js',
'jssrc/vendor/lang/pt-br.js',
'jssrc/vendor/lang/ru.js',
'jssrc/vendor/lang/sv.js',
'jssrc/vendor/lang/th.js',
'jssrc/vendor/lang/tr.js',
'jssrc/vendor/lang/zh-cn.js'],
dest: 'js/app.js'
}
},
uglify: {
kanboard: {
files: {
'js/app.min.js': ['js/app.js']
}
}
},
watch: {
grunt: {
options: {
reload: true
},
files: ['Gruntfile.js']
},
sass: {
files: 'scss/**/*.scss',
tasks: ['sass', 'cssmin']
},
javascript: {
files: 'jssrc/**/*.js',
tasks: ['concat', 'uglify']
},
}
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('build', ['sass', 'cssmin', 'concat', 'uglify', 'copy']);
grunt.registerTask('default', ['build','watch']);
}