This repository has been archived by the owner on Nov 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
77 lines (68 loc) · 2.37 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
apps_c:
commonjs:
src: [ 'src/**/*.{coffee,mustache}' ]
dest: 'build/app.js'
options:
main: 'src/views/app.coffee'
name: 'deadmonton'
stylus:
compile:
options:
paths: [ 'src/app.styl' ]
files:
'build/app.css': 'src/app.styl'
concat:
scripts:
src: [
# Vendor dependencies.
'vendor/jquery/jquery.js'
'vendor/lodash/dist/lodash.js'
'vendor/leaflet-dist/leaflet.js'
'vendor/leaflet-providers/leaflet-providers.js'
'vendor/leaflet-heat/index.js'
'vendor/lzma-js/index.js'
'vendor/async/lib/async.js'
'vendor/moment/moment.js'
'vendor/ractive/ractive.js'
# Our app.
'build/app.js'
]
dest: 'build/app.bundle.js'
options:
separator: ';' # for minification purposes
styles:
src: [
# Vendor dependencies.
'vendor/normalize-css/normalize.css'
'vendor/leaflet-dist/leaflet.css'
# Our style.
'build/app.css'
]
dest: 'build/app.bundle.css'
uglify:
scripts:
files:
'build/app.min.js': 'build/app.js'
'build/app.bundle.min.js': 'build/app.bundle.js'
cssmin:
combine:
files:
'build/app.min.css': 'build/app.css'
'build/app.bundle.min.css': 'build/app.bundle.css'
grunt.loadNpmTasks('grunt-apps-c')
grunt.loadNpmTasks('grunt-contrib-stylus')
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-cssmin')
grunt.registerTask('default', [
'apps_c'
'stylus'
'concat'
])
grunt.registerTask('minify', [
'uglify'
'cssmin'
])