forked from igdmapps/igdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (25 loc) · 838 Bytes
/
gulpfile.js
File metadata and controls
30 lines (25 loc) · 838 Bytes
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
'use strict';
var gulp = require('gulp');
var pug = require('gulp-pug');
var minifyhtml = require('gulp-htmlmin');
gulp.task('html', function () {
return gulp.src(['./browser/views/**/*.pug', '!./browser/views/**/_*.pug'])
.pipe(pug({pretty: true}))
.pipe(gulp.dest(function (file) {
return './browser/'
}));
});
gulp.task('website-html', function () {
return gulp.src(['./docs-src/**/*.pug', '!./docs-src/**/_*.pug'])
.pipe(pug({ pretty: true }))
.pipe(gulp.dest(function (file) {
// Keeps folder and file structure intact
let base = file.base.split('docs-src/');
return base[0] + 'docs/' + base[1];
}));
});
gulp.task('watch', function(){
gulp.watch('./browser/views/**/*.pug', ['html']);
gulp.watch('./docs-src/**/*.pug', ['website-html']);
})
gulp.task('build', ['html']);