1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +00:00

build fixes

This commit is contained in:
EmeraldBlock 2023-03-04 21:23:14 -06:00
parent 24ceb6664d
commit bd781f8750
2 changed files with 9 additions and 11 deletions

View File

@ -38,13 +38,6 @@ jobs:
- name: Lint
run: |
yarn lint
- name: TSLint
run: |
cd gulp
yarn gulp translations.fullBuild
yarn gulp localConfig.findOrCreate
cd ..
yarn tslint
yaml-lint:
name: yaml-lint

View File

@ -2,6 +2,7 @@ import gulp from "gulp";
import BrowserSync from "browser-sync";
const browserSync = BrowserSync.create({});
import path from "path/posix";
import pathNative from "path";
import deleteEmpty from "delete-empty";
import { execSync } from "child_process";
@ -189,12 +190,16 @@ function serveHTML({ version = "web-dev" }) {
// Watch the build folder and reload when anything changed
const extensions = ["html", "js", "png", "gif", "jpg", "svg", "mp3", "ico", "woff2", "json"];
gulp.watch(extensions.map(ext => path.join(buildFolder, "**", "*." + ext))).on("change", function (path) {
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
gulp.watch(extensions.map(ext => path.join(buildFolder, "**", "*." + ext))).on("change", function (p) {
return gulp
.src(pathNative.resolve(p).replaceAll(pathNative.sep, path.sep))
.pipe(browserSync.reload({ stream: true }));
});
gulp.watch("../src/js/built-temp/*.json").on("change", function (path) {
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
gulp.watch("../src/js/built-temp/*.json").on("change", function (p) {
return gulp
.src(pathNative.resolve(p).replaceAll(pathNative.sep, path.sep))
.pipe(browserSync.reload({ stream: true }));
});
gulp.series("js." + version + ".dev.watch")(() => true);