forked from eddiemachado-zz/bones
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
71 lines (65 loc) · 1.98 KB
/
Gruntfile.coffee
File metadata and controls
71 lines (65 loc) · 1.98 KB
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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
less:
compile:
files:
'affable/css/head.css': 'affable/css/head.less'
'affable/css/style.css': 'affable/css/style.less'
coffee:
options:
bare: true
compile:
files:
'affable/js/affable.js': ['affable/js/*.coffee']
concat:
js:
options:
separator: ';'
files:
'affable/js/all.js': [
'library/js/scripts.js', # Bones JS
'affable/js/libs/prettify.js',
'affable/js/affable.js'
]
css:
files:
'affable/css/all.css': [
'affable/css/head.css',
'affable/css/libs/prettify.css',
'affable/css/style.css'
]
watch:
less:
files: ['affable/css/*.less']
tasks: ['less', 'concat', 'reload']
coffee:
files: ['affable/js/*.coffee']
tasks: ['coffee', 'concat', 'reload']
all:
files: ['**/*.php']
tasks: ['reload']
uglify:
all:
files:
'affable/js/all.js': ['affable/js/all.js']
cssmin:
all:
files:
'affable/css/all.css': ['affable/css/all.css']
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-cssmin'
# https://coderwall.com/p/keuhda
grunt.registerTask "reload", "reload Chrome on OS X", ->
require("child_process").exec "osascript " +
"-e 'tell application \"Google Chrome Canary\" " +
"to tell the active tab of its first window' " +
"-e 'reload' " +
"-e 'end tell'"
grunt.registerTask 'default', ['less', 'coffee', 'concat']
grunt.registerTask 'dev', ['default', 'watch']
grunt.registerTask 'build', ['default', 'uglify', 'cssmin']