-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.coffee
75 lines (64 loc) · 1.78 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
module.exports = (grunt) ->
# Constants
CQ_HOST = 'localhost'
CQ_PORT = '4502'
CQ_USER = 'admin'
CQ_PASSWORD = 'admin'
# Load grunt modules
grunt.loadNpmTasks 'grunt-shell'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-sling-content'
grunt.loadNpmTasks 'grunt-contrib-clean'
# Project configuration
grunt.initConfig
shell:
install:
command: 'node ./node_modules/bower/bin/bower install'
copy:
'bootstrap-js':
cwd: 'app/components/bootstrap/dist/js/'
src: 'bootstrap.js'
dest: 'app/root/etc/clientlibs/bootstrap/bootstrap/source/'
expand: true
'jquery-js':
cwd: 'app/components/jquery/'
src: 'jquery.js'
dest: 'app/root/etc/clientlibs/bootstrap/jquery/source/'
expand: true
'bootstrap-css':
cwd: 'app/components/bootstrap/dist/'
src: [
'css/bootstrap.css'
'fonts/*'
]
dest: 'app/root/etc/clientlibs/bootstrap/bootstrap/themes/default/'
expand: true
clean:
copy: [
'app/root/etc/clientlibs/bootstrap/jquery/source/*'
'app/root/etc/clientlibs/bootstrap/bootstrap/source/*'
'app/root/etc/clientlibs/bootstrap/bootstrap/themes/default/*'
'!app/root/etc/clientlibs/bootstrap/bootstrap/themes/default/css.txt'
],
'sling-content':
options:
host: CQ_HOST
port: CQ_PORT
user: CQ_USER
pass: CQ_PASSWORD
root: 'app/root'
grunt.registerTask 'dist', [
'clean:copy'
'copy:bootstrap-js'
'copy:bootstrap-css'
'copy:jquery-js'
]
grunt.registerTask 'install', [
'shell:install'
]
grunt.registerTask 'deploy', 'sling-content'
grunt.registerTask 'default', [
'install'
'dist'
'deploy'
]