-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.coffee
88 lines (78 loc) · 2.1 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
80
81
82
83
84
85
86
87
88
module.exports = (grunt) ->
grunt.initConfig
connect:
server:
options:
base:'public'
livereload:true
coffee:
scripts:
options:
bare: true
files: [
src: ["app/src/**/*.coffee"]
dest: "public/src/cursive.js"
]
less:
development:
options:
paths: ['app/style']
files: [
expand:true
cwd: 'app/style'
dest: 'public/style'
src: ['*.less']
ext: '.css'
]
copy:
static:
expand:true
cwd:'app'
src: ['image/**/*','style/*.css','src/*.js','src/*.map','fonts/*','favicon.ico']
dest: 'public'
rename:
index:
src:'public/index_fr.html',
dest:'public/index.html',
template_runner:
basic:
options:
locales: ['fr','en']
files:
'public/':['app/index.html']
watch:
scripts:
files: ['app/src/**/*.coffee']
tasks: ['coffee']
styles:
files: ['app/style/**/*.less']
tasks: ['less']
static:
files: ['app/**/*']
tasks: ['copy']
i18n:
files: ['locales/*.json','app/index.html']
tasks: ['template_runner','rename']
livereload:
options:
livereload: true
files: ['public/**/*']
clean: ['public']
buildGhPages:
production:
options:
dist: 'public'
pull: false
cname: 'cursive.serpodile.com'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-template-runner'
grunt.loadNpmTasks 'grunt-rename'
grunt.loadNpmTasks 'grunt-build-gh-pages'
grunt.registerTask 'default', ['build','connect','watch']
grunt.registerTask 'build', ['clean','coffee','less','copy','template_runner','rename']
grunt.registerTask 'deploy', ['build','buildGhPages']