forked from nowaym/groundwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
79 lines (69 loc) · 1.96 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
watch:
jade:
files: '**/*.jade'
tasks: ['jade']
compass:
files: '**/*.sass'
tasks: ['compass', 'autoprefixer', 'cssmin']
coffee:
files: '**/*.coffee'
tasks: ['coffee', 'uglify']
jade:
build:
options:
pretty: true
files: [
expand: true
cwd: 'src/jade'
src: ['**/*.jade', '!template.jade']
dest: 'docs'
ext: '.html'
]
compass:
build:
options:
config: 'config.rb'
trace: true
autoprefixer:
build:
options:
browsers: ['last 2 versions']
files:
'css/groundwork.css': ['css/groundwork.css']
coffee:
individual:
expand: true
cwd: 'src/coffee'
src: ['**/*.coffee', '!groundwork.all.coffee']
dest: 'js'
ext: '.js'
concatenated:
options:
join: true
files:
"js/groundwork.all.js": ["src/coffee/components/*.coffee", "src/coffee/plugins/*.coffee"]
uglify:
minify:
files:
'js/groundwork.all.js': ['js/groundwork.all.js']
cssmin:
minify:
expand: true
cwd: 'css/'
src: ['*.css', '!*.min.css']
dest: 'css/'
ext: '.css'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-compass'
grunt.loadNpmTasks 'grunt-autoprefixer'
grunt.loadNpmTasks 'grunt-contrib-cssmin'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.registerTask 'default', ['build']
grunt.registerTask 'build', ['compass', 'autoprefixer', 'coffee:individual', 'coffee:concatenated', 'cssmin', 'uglify']
grunt.registerTask 'docs', ['jade']