-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
gulpfile.js
67 lines (60 loc) · 1.57 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
var gulp = require('gulp');
// Pug
const pug = require('gulp-pug');
const pugI18n = require('gulp-i18n-pug');
// TS
const typescript = require('gulp-typescript');
//const babel = require('gulp-babel');
// Sass
const sass = require('gulp-sass');
const exec = require('gulp-exec');
gulp.task('pug', () => {
return gulp.src(['./pug/**/*.pug', './pug/**/*.jade', '!**/layout*', '!**/include/*', '!**/includes/*'])
.pipe(pug({
pretty: true
}))
.pipe(gulp.dest('./production/'));
});
gulp.task('pugI18n', () => {
var options = {
i18n: {
//verbose: true,
dest: './production/',
locales: './locales/*.*'
},
pretty: true
};
return gulp.src(['./pugI18n/**/*.pug', './pugI18n/**/*.jade', '!**/layout*', '!**/include/*', '!**/includes/*'])
.pipe(pugI18n(options))
.pipe(gulp.dest(options.i18n.dest));
});
gulp.task('default', gulp.series('pug', 'pugI18n'));
gulp.task('sass', () => {
return gulp.src('./scss/**/*.scss')
.pipe(sass())
.pipe(gulp.dest('./production/'));
});
gulp.task('ts', () => {
return gulp.src([ './ts/**/*.ts' ])
.pipe(typescript({ target: 'ES5', module: 'commonjs' }))
.js
.pipe(gulp.dest('./production/'));
});
gulp.task('shell', () => {
return gulp.src('.')
.pipe(exec("./build_local_console.sh",(err, stdout, stderr) => {
if (stdout) {
console.log(stdout);
}
if (stderr) {
console.log(stderr);
}
}));
});
/*
gulp.task('babel', function() {
gulp.src('./production/console/js-ES6/*.js')
.pipe(babel())
.pipe(gulp.dest('./production/console/js'))
});
*/