mirror of
https://github.com/home-assistant/frontend.git
synced 2025-10-24 02:59:47 +00:00
Use tsx to run gulp
This commit is contained in:
@@ -1,57 +1,54 @@
|
||||
import { parallel, series, task } from "gulp";
|
||||
import { parallel, series } from "gulp";
|
||||
import { isStatsBuild, isTestBuild } from "../env.ts";
|
||||
import "./clean.ts";
|
||||
import "./compress.ts";
|
||||
import "./entry-html.ts";
|
||||
import "./gather-static.ts";
|
||||
import "./gen-icons-json.ts";
|
||||
import "./locale-data.ts";
|
||||
import "./rspack.ts";
|
||||
import "./service-worker.ts";
|
||||
import "./translations.ts";
|
||||
import { clean } from "./clean.ts";
|
||||
import { compressApp } from "./compress.ts";
|
||||
import { genPagesAppDev, genPagesAppProd } from "./entry-html.ts";
|
||||
import { copyStaticApp } from "./gather-static.ts";
|
||||
import { genIconsJson } from "./gen-icons-json.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackProdApp, rspackWatchApp } from "./rspack.ts";
|
||||
import {
|
||||
genServiceWorkerAppDev,
|
||||
genServiceWorkerAppProd,
|
||||
} from "./service-worker.ts";
|
||||
import { buildTranslations } from "./translations.ts";
|
||||
|
||||
task(
|
||||
"develop-app",
|
||||
series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean",
|
||||
parallel(
|
||||
"gen-service-worker-app-dev",
|
||||
"gen-icons-json",
|
||||
"gen-pages-app-dev",
|
||||
"build-translations",
|
||||
"build-locale-data"
|
||||
),
|
||||
"copy-static-app",
|
||||
"rspack-watch-app"
|
||||
)
|
||||
// develop-app
|
||||
export const developApp = series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
clean,
|
||||
parallel(
|
||||
genServiceWorkerAppDev,
|
||||
genIconsJson,
|
||||
genPagesAppDev,
|
||||
buildTranslations,
|
||||
buildLocaleData
|
||||
),
|
||||
copyStaticApp,
|
||||
rspackWatchApp
|
||||
);
|
||||
|
||||
task(
|
||||
"build-app",
|
||||
series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean",
|
||||
parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-app",
|
||||
"rspack-prod-app",
|
||||
parallel("gen-pages-app-prod", "gen-service-worker-app-prod"),
|
||||
// Don't compress running tests
|
||||
...(isTestBuild() || isStatsBuild() ? [] : ["compress-app"])
|
||||
)
|
||||
// build-app
|
||||
export const buildApp = series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
clean,
|
||||
parallel(genIconsJson, buildTranslations, buildLocaleData),
|
||||
copyStaticApp,
|
||||
rspackProdApp,
|
||||
parallel(genPagesAppProd, genServiceWorkerAppProd),
|
||||
// Don't compress running tests
|
||||
...(isTestBuild() || isStatsBuild() ? [] : [compressApp])
|
||||
);
|
||||
|
||||
task(
|
||||
"analyze-app",
|
||||
series(
|
||||
async () => {
|
||||
process.env.STATS = "1";
|
||||
},
|
||||
"clean",
|
||||
"rspack-prod-app"
|
||||
)
|
||||
// analyze-app
|
||||
export const analyzeApp = series(
|
||||
async () => {
|
||||
process.env.STATS = "1";
|
||||
},
|
||||
clean,
|
||||
rspackProdApp
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user