1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 10:48:44 +00:00

Landing page (#22598)

This commit is contained in:
Wendelin
2024-11-20 17:20:08 +01:00
committed by GitHub
parent 6a337cc486
commit 5b8e63a213
41 changed files with 1262 additions and 21 deletions

View File

@@ -14,6 +14,7 @@ import {
createDemoConfig,
createGalleryConfig,
createHassioConfig,
createLandingPageConfig,
} from "../webpack.cjs";
const bothBuilds = (createConfigFunc, params) => [
@@ -41,6 +42,7 @@ const runDevServer = async ({
contentBase,
port,
listenHost = undefined,
proxy = undefined,
}) => {
if (listenHost === undefined) {
// For dev container, we need to listen on all hosts
@@ -56,6 +58,7 @@ const runDevServer = async ({
directory: contentBase,
watch: true,
},
proxy,
},
compiler
);
@@ -199,3 +202,30 @@ gulp.task("webpack-prod-gallery", () =>
})
)
);
gulp.task("webpack-watch-landing-page", () => {
// This command will run forever because we don't close compiler
webpack(
process.env.ES5
? bothBuilds(createLandingPageConfig, { isProdBuild: false })
: createLandingPageConfig({ isProdBuild: false, latestBuild: true })
).watch({ poll: isWsl }, doneHandler());
gulp.watch(
path.join(paths.translations_src, "en.json"),
gulp.series(
"build-landing-page-translations",
"copy-translations-landing-page"
)
);
});
gulp.task("webpack-prod-landing-page", () =>
prodBuild(
bothBuilds(createLandingPageConfig, {
isProdBuild: true,
isStatsBuild: env.isStatsBuild(),
isTestBuild: env.isTestBuild(),
})
)
);