This repository has been archived by the owner on Aug 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
115 lines (99 loc) · 2.38 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
105
106
107
108
109
110
111
112
113
114
115
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
webfont:
icons:
src: 'dev/icons/*.svg'
dest: 'icons'
destCss: 'dev'
options:
font: 'icons'
rename: (name) ->
class_name = name.toLowerCase()
class_name = class_name.replace("i_", "")
remove_path = class_name.lastIndexOf('/')
class_name = class_name.substr((remove_path + 1))
return class_name
syntax: "bootstrap"
hashes: false
engine:"node"
templateOptions:
baseClass: "icon"
classPrefix: "icon-"
mixinPrefix: "icon-"
stylesheet: "styl"
relativeFontPath: "/icons"
embed: ['woff', 'ttf', 'svg', 'eot']
coffee:
compile:
options:
bare: true
files:
'kay.js': [
'dev/**/*.coffee',
]
stylus:
compile:
options:
compress: false
paths: ['dev']
files: [
'kay.css': 'dev/kay.styl'
'demo.css': 'dev/demo.styl'
]
jade:
templates:
files: [{
expand: true
src: "**/*.jade"
dest: ""
cwd: "dev"
ext: ".html"
}]
options:
compileDebug: true
watch:
coffee:
files: ['dev/**/*.coffee']
tasks: ['coffee']
stylus:
files: ['dev/**/*.styl']
tasks: ['stylus']
jade:
files: ['dev/**/*.jade']
tasks: ['jade:templates']
cssmin:
minify:
expand: true
cwd: ''
src: ['*.css', '!*.min.css']
dest: ''
ext: '.min.css'
uglify:
kay:
options:
mangle: false
files:
'kay.min.js': ['kay.js']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-cssmin'
grunt.loadNpmTasks 'grunt-webfont'
grunt.registerTask 'default', [
'webfont',
'coffee',
'stylus',
'jade:templates',
'watch'
]
grunt.registerTask 'prod', [
'webfont',
'coffee',
'stylus',
'jade:templates',
'uglify'
'cssmin'
]