This repository has been archived by the owner on Jan 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
69 lines (58 loc) · 1.47 KB
/
gulpfile.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
// Variables and requirements
var gulp = require('gulp');
var VIUR = {
css: require('viur-ignite-css'),
js: require('viur-ignite-js'),
icons: require('viur-ignite-icons'),
html: require('viur-ignite-html'),
compressor: require('viur-ignite-compressor')
}
var srcpaths = {
html: './sources/html/**/*',
less: './sources/less/**/*.less',
js: './sources/js/**/*.js',
};
// Tasks
// compilation and postproduction of LESS to CSS
gulp.task('css', function () {
return VIUR.css.build()
});
// compilation of JS
gulp.task('js', function () {
return VIUR.js.build()
});
// build icon classes
gulp.task('icons', function () {
return VIUR.icons.build()
});
// compression
gulp.task('compress', function () {
return VIUR.compressor.build({
index: "./sources/html/_layout.html",
appName: 'VIUR Ignite Docs',
appURL: 'www.viur.is',
appDescription: 'Documentation of VIUR Ignite',
developerName: 'Mausbrand',
developerURL: 'www.mausbrand.de',
background: '#d00f1c'
})
});
// html rendering
gulp.task('html', function () {
return VIUR.html.build()
});
// create source folder with prototype style.less
// create source folder with prototype app.js
// create source folder with icons
gulp.task('init', function () {
VIUR.css.init();
VIUR.js.init();
VIUR.icons.init();
});
gulp.task('watch', function () {
gulp.watch(srcpaths.less, ['css']);
gulp.watch(srcpaths.js, ['js']);
gulp.watch(srcpaths.html, ['html']);
});
// default rendering
gulp.task('default', ['css', 'js', 'html']);