forked from fliptheweb/range-control
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
94 lines (84 loc) · 2.17 KB
/
Gruntfile.coffee
File metadata and controls
94 lines (84 loc) · 2.17 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = (grunt) ->
grunt.initConfig
concat:
main:
src: [
'public/js/**/*.js'
]
dest: 'public/js/main.js'
uglify:
main:
files:
'public/js/jquery.rangecontrol.min.js': 'public/js/jquery.rangecontrol.js'
# Run simple server for static
connect:
test:
options:
port: 8888
base: '.'
keepalive: true
# Compile compass
compass:
prod:
options:
environment: 'production'
outputStyle: 'compressed'
dev:
options:
environment: 'development'
outputStyle: 'expanded'
# Sass instead of compass, cuz its support sourceMap
sass:
prod:
options:
compass: true
style: 'compressed'
files:
'css/main.css': 'css/sass/main.scss'
dev:
options:
compass: true
sourcemap: true
debugInfo: true
files:
'css/main.css': 'css/sass/main.scss'
# Compile coffeeScript
coffee:
prod:
options:
join: true
files:
'public/js/jquery.rangecontrol.js': 'src/coffee/rangeControl.coffee'
'public/js/main.js': 'src/coffee/main.coffee'
dev:
options:
sourceMap: true
join: true
files:
'public/js/jquery.rangecontrol.js': 'src/coffee/rangeControl.coffee'
'public/js/main.js': 'src/coffee/main.coffee'
test:
files:
'test/tests.js':'test/test.*.coffee'
# Watch for coffee, sass
watch:
scripts:
files: 'src/coffee/*.coffee'
tasks: ['coffee:dev', 'uglify']
styles:
files: 'src/sass/*.scss'
tasks: 'compass:dev'
# Mocha client-side tests
mocha:
all: 'test/*.html'
# Simple mocha
simplemocha:
test:
src: 'test/test.*.js'
options:
reporter: 'spec'
slow: 200
timeout: 1000
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.registerTask 'default', ['coffee:dev', 'uglify']
grunt.registerTask 'test', ['coffee:test', 'simplemocha:test']