-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
96 lines (82 loc) · 2.06 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
#global module:false
"use strict"
module.exports = (grunt) ->
require('load-grunt-tasks')( grunt )
grunt.initConfig
less:
bootstrap:
options:
paths: ['node_modules/bootstrap/less']
files:
"assets/css/bootstrap.css" : [
"_styles/less/bootstrap.less"
]
concat:
css:
src: [
'assets/css/bootstrap.css'
'dist/discogs-embed.css'
]
dest: 'assets/css/discogs-embed-deps.css'
bower_concat:
all:
dest: 'assets/js/bower_vendor.js'
cssDest: 'assets/css/bower_vendor.css'
stylus:
compile:
options:
paths: ['_styles/styl']
urlfunc: 'embedurl'
import: [
'./../../node_modules/nib/index.styl'
]
files:
'dist/discogs-embed.css': '_styles/styl/app.styl'
uglify:
app:
files:
'dist/discogs-embed.min.js': [
'assets/js/templates/discogs-embed.js'
'discogs-embed.js'
]
cssmin:
combine:
files:
'dist/discogs-embed-deps.min.css' : ['assets/css/discogs-embed-deps.css']
handlebars:
compile:
options:
namespace: "discogsEmbed.templates"
processName: (filePath) ->
return filePath.split('/').pop().replace('.hbs', '')
files:
"assets/js/templates/discogs-embed.js": "_templates/**/*.hbs"
watch:
options:
spawn : false
interrupt : true
atBegin : true
livereload: true
source:
files: [
"_styles/styl/**/*"
"_templates/**/*"
"discogs-embed.js"
]
tasks: [
"bower_concat"
"less:bootstrap"
"stylus"
"concat"
"handlebars"
"uglify"
]
grunt.registerTask "build", [
"bower_concat"
"less:bootstrap"
"stylus"
"concat"
"cssmin"
"handlebars"
"uglify"
]