-
Notifications
You must be signed in to change notification settings - Fork 231
/
Gruntfile.coffee
74 lines (64 loc) · 1.9 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
# Thanks to Jackson Gariety (https://github.com/jacksongariety/) for
# contributing the initial version of this Gruntfile.
module.exports = (grunt) ->
path = require('path')
# Configure plugins
grunt.initConfig
express:
all:
options:
port: 8000
hostname: "0.0.0.0"
bases: [path.resolve(__dirname, '.')]
open:
all:
path: 'http://localhost:<%= express.all.options.port%>'
coffee:
all:
options:
join: true
files:
"./javascripts/skeuocard.js": [
"./javascripts/src/Skeuocard.coffee",
"./javascripts/src/FlipTabView.coffee",
"./javascripts/src/SegmentedCardNumberInputView.coffee",
"./javascripts/src/ExpirationInputView.coffee",
"./javascripts/src/TextInputView.coffee",
"./javascripts/src/CardProduct.coffee"
]
sass:
all:
options:
style: 'compressed'
files:
"./styles/skeuocard.reset.css": "./styles/src/skeuocard.reset.scss"
"./styles/skeuocard.css": "./styles/src/skeuocard.scss"
"./styles/demo.css": "./styles/src/demo.scss"
uglify:
all:
options:
mangle: false # don't change function names
files:
"./javascripts/skeuocard.min.js": "./javascripts/skeuocard.js"
watch:
all:
files: [
"./javascripts/src/*.coffee"
"./styles/src/*.scss"
]
tasks: ["coffee", "sass", "uglify"]
options:
livereload: true
# Load plugins
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-sass"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-open"
grunt.loadNpmTasks "grunt-express"
# Default task
grunt.registerTask "default", [
"express",
"open",
"watch"
]