-
Notifications
You must be signed in to change notification settings - Fork 38
/
Gruntfile.coffee
72 lines (59 loc) · 1.64 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
module.exports = ->
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
# CoffeeScript compilation
coffee:
src:
options:
bare: true
expand: true
src: ['js/*.coffee']
ext: '.js'
###
exec:
main_install:
command: './node_modules/.bin/component install'
main_build:
command: './node_modules/.bin/component build -o browser -n interpolator -c'
vulcanize:
command: './node_modules/.bin/vulcanize --csp -o preorder/merged.html preorder/index.html'
###
# JavaScript minification for the browser
uglify:
options:
report: 'min'
src:
files:
'./js/script.min.js': ['./js/script.js']
# jekyll
jekyll:
dev:
options:
config: '_config.yml'
serve: false
connect:
dev:
options:
port: 4000
base: "./_site"
open: true
keepalive: true
# Automated recompilation and testing when developing
watch:
build:
files: ['**/*.coffee', '**/*.html', '**/*.md', '**/*.css', '!_site/**/*']
tasks: ['build']
# Grunt plugins used for building
@loadNpmTasks 'grunt-contrib-coffee'
@loadNpmTasks('grunt-contrib-connect')
@loadNpmTasks('grunt-jekyll')
#@loadNpmTasks 'grunt-exec'
@loadNpmTasks 'grunt-contrib-uglify'
# Grunt plugins used for testing
@loadNpmTasks 'grunt-contrib-watch'
# Our local tasks
@registerTask 'build', ['coffee', 'jekyll']
@registerTask 'serve', ['build','connect']
#@registerTask 'test',
@registerTask 'default', ['build']