-
Notifications
You must be signed in to change notification settings - Fork 13
/
Gruntfile.coffee
102 lines (97 loc) · 3.79 KB
/
Gruntfile.coffee
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
module.exports = (grunt) ->
# configure the tasks
grunt.initConfig
browserify:
options:
debug: true
transform: ['coffee-reactify']
extensions: ['.jsx', '.cjsx', '.coffee']
dev:
options:
alias: ['react:'] # Make React available externally for dev tools
files:
'offenesparlament/offenesparlament/static/scripts/app.js': 'client/scripts/app.coffee'
'offenesparlament/offenesparlament/static/scripts/homepage.js': 'client/scripts/homepage.coffee'
sass:
dev:
options:
sourcemap: 'inline'
files:
'offenesparlament/offenesparlament/static/css/vendor.css': 'client/styles/vendor/vendor.sass'
'offenesparlament/offenesparlament/static/css/site.css': 'client/styles/site.sass'
'offenesparlament/offenesparlament/static/css/kontext.css': 'client/styles/kontext.sass'
'offenesparlament/offenesparlament/static/css/email.css': 'client/styles/emails/base.sass'
watch:
styles:
files: 'client/styles/**/*'
#tasks: [ 'clean:style_images', 'build_styles' ]
tasks: [ 'build_styles_tiny' ]
scripts:
files: 'client/scripts/**/*'
tasks: [ 'browserify:dev' ]
browserSync:
dev:
bsFiles:
src : [
'offenesparlament/offenesparlament/**/*'
'!offenesparlament/offenesparlament/static/fonts/**/*'
'!**/*.sqlite3'
'!**/*.map'
'!**/*.DS_Store'
]
options:
watchTask: true
proxy: 'offenesparlament.vm:8000'
ghostMode: false
open: false
reloadOnRestart: false
reloadDebounce: 1000
copy:
images:
cwd: 'client/styles/'
src: [ 'img/**/*' ]
dest: 'offenesparlament/offenesparlament/static/css/'
expand: true
fonts:
cwd: 'client/styles/'
src: [ 'fonts/**/*' ]
dest: 'offenesparlament/offenesparlament/static/'
expand: true
clean:
build: src: [
'offenesparlament/offenesparlament/static/css'
'offenesparlament/offenesparlament/static/scripts/app.js'
]
style_images: src: 'offenesparlament/offenesparlament/static/css/img'
style_fonts: src: 'offenesparlament/offenesparlament/static/fonts'
scripts: src: 'offenesparlament/offenesparlament/static/scripts'
favicons: src: 'offenesparlament/offenesparlament/static/favicons'
favicons:
options:
androidHomescreen: true
trueColor: true
precomposed: true
appleTouchBackgroundColor: "#ffffff"
coast: true
windowsTile: true
tileBlackWhite: false
tileColor: "#ffffff"
icons:
src: 'client/styles/img/favicon.png'
dest: 'offenesparlament/offenesparlament/static/favicons/'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-browser-sync'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-sass'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-browserify'
grunt.loadNpmTasks 'grunt-favicons'
grunt.registerTask 'build_styles', ['sass:dev', 'copy:images', 'copy:fonts']
grunt.registerTask 'build_styles_tiny', ['sass:dev']
grunt.registerTask 'clean_except_icons', [ 'clean:build', 'clean:style_images', 'clean:style_fonts', 'clean:scripts' ]
grunt.registerTask 'icons', ['favicons:icons']
grunt.registerTask 'once', ['clean_except_icons', 'build_styles', 'browserify:dev']
grunt.registerTask 'dev', ['clean_except_icons', 'build_styles', 'browserify:dev', 'watch']
grunt.registerTask 'dev_tiny', ['build_styles', 'watch']
grunt.registerTask 'reloading', ['clean_except_icons', 'build_styles', 'browserify:dev', 'browserSync', 'watch']