1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-11 09:11:50 +00:00
tobspr_shapez.io/gulp/translations.js
Даниїл Григор'єв 5ff15f3029
Apply formatting to gulp
2024-06-20 13:00:58 +03:00

21 lines
599 B
JavaScript

import path from "path/posix";
import fs from "fs/promises";
import YAML from "yaml";
import gulp from "gulp";
import gulpPlumber from "gulp-plumber";
import gulpYaml from "gulp-yaml";
const translationsSourceDir = path.join("..", "translations");
const translationsJsonDir = path.join("..", "src", "js", "built-temp");
export function convertToJson() {
return gulp
.src(path.join(translationsSourceDir, "*.yaml"))
.pipe(gulpPlumber())
.pipe(gulpYaml({ space: 2, safe: true }))
.pipe(gulp.dest(translationsJsonDir));
}
export const fullBuild = convertToJson;