-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
109 lines (108 loc) · 2.78 KB
/
Gruntfile.js
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
* desarrollowebnodejs Gruntfile
*
* Desarrollo Web NodeJS • Quito Ecuador
*
* Copyright (c) 2017 Desarrollo Web NodeJS • Quito Ecuador
* Bajo licencia MIT (https://github.com/DesarrolloWebNodeJS/desarrollowebnodejs.github.io/blob/master/LICENCIA)
* Para contacto y soporte: https://desarrollowebnodejs.github.io
*/
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
grunt.initConfig({
leerJson: grunt.file.readJSON('package.json'),
estandarte: '/*\n' +
'* <%= leerJson.name %> version: <%= leerJson.version %>\n' +
'*\n' +
'* <%= leerJson.description %>\n' +
'*\n' +
'* Copyright (c) 2017 Desarrollo Web NodeJS • Quito Ecuador \n' +
'* Bajo licencia MIT (https://github.com/DesarrolloWebNodeJS/desarrollowebnodejs.github.io/blob/master/LICENCIA)\n' +
'* Contacto / Soporte: <%= leerJson.homepage %>\n' +
'*/\n\n',
watch: {
scripts: {
files: 'js/*',
tasks: ['uglify', 'desarrollo'],
},
},
uglify: {
main: {
options: {
banner: '<%= estandarte %>',
preserveComments: 'some'
},
files: {
'act/js/vr1.min.js': ['js/jvr1.js']
}
}
},
copy: {
activos: {
files: [
{
expand: true,
flatten: true,
src: ['bower_components/font-awesome/fonts/*'],
dest: 'act/fonts',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ["bower_components/font-awesome/css/font-awesome.min.css",
"bower_components/animate.css/animate.min.css"],
dest: "act/css/"
},
{
expand: true,
flatten: true,
src: ["bower_components/jquery/dist/jquery.min.js",
"bower_components/jquery/dist/jquery.min.map",
"bower_components/tether/dist/js/tether.min.js",
"bower_components/jquery.easing/jquery.easing.min.js",
"bower_components/moment/min/moment-with-locales.min.js"],
dest: "act/js/"
}
]
}
},
browserSync: {
dev: {
bsFiles: {
src : [
'_site/**/*.*',
'act/**/*.*' ]
},
options: {
online: false,
background: true,
notify: false,
watchTask: true,
server: '_site/',
port: 3005,
ui: {
port: 4005
}
}
}
},
exec: {
build: {
cmd: 'bundle exec jekyll build -w -I'
},
server: {
cmd: 'bundle exec jekyll serve'
},
deploy: {
cmd: 'rsync --progress -a --delete -e "ssh -q" _site/ myuser@host:mydir/'
}
}
});
grunt.registerTask("construir_bienes", ['uglify']);
grunt.registerTask("distribuir_activos", ['copy:activos', 'construir_bienes']);
grunt.registerTask("deploy", ['distribuir_activos', 'exec:server']);
grunt.registerTask("desarrollo", ['browserSync', 'exec:build']);
grunt.registerTask('default', ['desarrollo']);
};