-
Notifications
You must be signed in to change notification settings - Fork 409
Expand file tree
/
Copy pathgulpfile.js
More file actions
25 lines (22 loc) · 727 Bytes
/
Copy pathgulpfile.js
File metadata and controls
25 lines (22 loc) · 727 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
const gulp = require('gulp');
const rename = require("gulp-rename");
const cht = require('gulp-cht');
const replace = require('gulp-replace');
gulp.task('localization', () => {
// gulp.src('./index.html')
// .pipe(cht())
// .pipe(rename("zh-HK.html"))
// .pipe(gulp.dest("./"));
return gulp.src([
'dist/relationship.min.js',
'dist/relationship.min.mjs',
'dist/relationship-mode.min.js',
'dist/relationship-mode.min.mjs',
]).pipe(cht())
.pipe(replace('嶽','岳'))
.pipe(rename(function(path) {
path.basename = path.basename.replace('.min','.zh-HK.min');
}))
.pipe(gulp.dest('dist/lang/'))
});
gulp.task('default', gulp.series(['localization']))