38 lines
982 B
JavaScript
38 lines
982 B
JavaScript
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/'))
|
|
}
|
|
}; |