-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
104 lines (90 loc) · 2.91 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
102
103
104
sass = require('node-sass')
CssImporter = require('node-sass-css-importer')({
import_paths: ['assets/vendor']
})
module.exports = (grunt)->
require('load-grunt-tasks')(grunt)
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffee:
compile:
files:
'.tmp/scripts/client.js': 'assets/scripts/**/*.coffee'
concat:
options:
separator: ';'
dist:
src: [
'assets/vendor/lodash/dist/lodash.js'
'assets/vendor/jquery/dist/jquery.js'
'assets/vendor/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/button.js'
'assets/vendor/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/dropdown.js'
'assets/vendor/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js'
'assets/vendor/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/modal.js'
'assets/vendor/remarkable-bootstrap-notify/bootstrap-growl.js'
'assets/vendor/moment/moment.js'
'.tmp/scripts/**/*.js'
]
dest: 'public/scripts/<%= pkg.name %>.js'
uglify:
dist:
options:
sourceMap: true,
sourceMapName: 'public/scripts/<%= pkg.name %>.map'
files:
'public/scripts/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
clean:
files:
dot: true,
src: ['.tmp', 'public/scripts/**/*.js', 'public/styles/**/*.css']
copy:
fonts:
expand: true
flatten: true
src: ['assets/vendor/bootstrap-sass-official/vendor/assets/fonts/bootstrap/*']
dest: 'public/fonts/'
filter: 'isFile'
sass:
options:
implementation: sass
sourceMap: true
includePaths: ['assets/vendor']
importer: [CssImporter]
outputStyle: 'expanded'
dist:
files:
'public/styles/bingosync.css': 'assets/styles/bingosync.scss'
cssmin:
minify:
expand: true
cwd: 'public/styles/'
src: ['*.css', '!*.min.css']
dest: 'public/styles/'
ext: '.min.css'
nodemon:
dev:
script: 'app/app.coffee'
options:
watch: ['lib', 'app']
nodeArgs: ['--nodejs', '--debug'],
concurrent:
dev:
tasks: ['nodemon', 'watch']
options:
logConcurrentOutput: true
watch:
scss:
files: ['assets/styles/**/*.scss']
tasks: ['styles']
coffee:
files: ['Gruntfile.coffee', 'assets/**/*.coffee']
tasks: ['scripts']
scripts:
files: ['assets/**/*.js']
tasks: ['concat:dist', 'uglify']
'node-inspector':
'web-host': 'localhost'
grunt.registerTask 'scripts', ['coffee:compile', 'concat:dist', 'uglify']
grunt.registerTask 'styles', ['sass', 'copy', 'cssmin']
grunt.registerTask 'dev', ['concurrent:dev']
grunt.registerTask 'default', ['clean', 'scripts', 'styles']