-
Notifications
You must be signed in to change notification settings - Fork 24
/
gulpfile.js
45 lines (35 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
const webserver = require('gulp-webserver');
const del = require('del');
const files = require('./lib/files');
const fonts = require('./lib/fonts');
const gulp = require('gulp');
const images = require('./lib/images');
const init = require('./lib/init');
const javascript = require('./lib/javascript');
const markdown = require('./lib/markdown');
const sass = require('./lib/sass');
gulp.task('files', ['clean:files'], files);
gulp.task('clean:files', () => del(['web/assets/files']));
gulp.task('fonts', ['clean:fonts'], fonts);
gulp.task('clean:fonts', () => del(['web/assets/fonts']));
gulp.task('images', ['clean:images'], images);
gulp.task('clean:images', () => del(['web/assets/images']));
gulp.task('init', init);
gulp.task('js', ['clean:js'], javascript);
gulp.task('clean:js', () => del(['web/assets/javascript']));
gulp.task('markdown', ['clean:html'], markdown);
gulp.task('clean:html', () => del(['./web/**/*', '!./web/assets', '!./web/assets/**/*']));
gulp.task('sass', ['clean:css'], sass);
gulp.task('clean:css', () => del(['./web/assets/stylesheets']));
gulp.task('clean', ['clean:files', 'clean:images', 'clean:js', 'clean:html', 'clean:css']);
gulp.task('default', ['markdown', 'sass', 'js', 'images', 'files', 'fonts']);
gulp.task('webserver', function() {
gulp.watch('./src/**/*', ['default']);
gulp.watch('./templates/**/*', ['default']);
gulp.src('./web')
.pipe(webserver({
livereload: true,
directoryListing: false,
open: true
}));
});