Recreate translations when changed on dev (#5042)

This commit is contained in:
Bram Kragten
2020-03-02 16:55:16 +01:00
committed by GitHub
parent 5066560411
commit d392695ab7
4 changed files with 18 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ const gulp = require("gulp");
const webpack = require("webpack");
const WebpackDevServer = require("webpack-dev-server");
const log = require("fancy-log");
const path = require("path");
const paths = require("../paths");
const {
createAppConfig,
@@ -58,9 +59,13 @@ const handler = (done) => (err, stats) => {
gulp.task("webpack-watch-app", () => {
// we are not calling done, so this command will run forever
webpack(createAppConfig({ isProdBuild: false, latestBuild: true })).watch(
{},
{ ignored: /build-translations/ },
handler()
);
gulp.watch(
path.join(paths.translations_src, "en.json"),
gulp.series("build-translations", "copy-translations")
);
});
gulp.task(