forked from t1m0n/air-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jade.js
38 lines (36 loc) · 982 Bytes
/
jade.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
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
_jade = require('jade'),
jade = require('gulp-jade');
_jade.filters.code = function( block ) {
return block
.replace( /\…/g, '…' )
.replace( /&/g, '&' )
.replace( /</g, '<' )
.replace( />/g, '>' )
.replace( /"/g, '"' )
.replace( /#/g, '#' )
.replace( /\\/g, '\\\\' );
};
module.exports = {
ru: function () {
gulp.src('docs/jade/pages/index-ru.jade')
.pipe(plumber())
.pipe(jade({
data: {
lang: 'ru'
}
}))
.pipe(gulp.dest('docs/'))
},
en: function () {
gulp.src('docs/jade/pages/index.jade')
.pipe(plumber())
.pipe(jade({
data: {
lang: 'en'
}
}))
.pipe(gulp.dest('docs/'))
}
};