1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 09:18:34 +01:00
This commit is contained in:
Paulus Schoutsen
2020-05-22 23:05:47 -07:00
committed by GitHub
parent 7daafcbe1b
commit 7e281f66c2
35 changed files with 1080 additions and 120 deletions
+15 -10
View File
@@ -51,6 +51,12 @@ function copyPolyfills(staticDir) {
);
}
function copyLoaderJS(staticDir) {
const staticPath = genStaticPath(staticDir);
copyFileDir(npmPath("systemjs/dist/s.min.js"), staticPath("js"));
copyFileDir(npmPath("systemjs/dist/s.min.js.map"), staticPath("js"));
}
function copyFonts(staticDir) {
const staticPath = genStaticPath(staticDir);
// Local fonts
@@ -72,17 +78,17 @@ function copyMapPanel(staticDir) {
);
}
gulp.task("copy-translations", (done) => {
gulp.task("copy-translations-app", async () => {
const staticDir = paths.static;
copyTranslations(staticDir);
done();
});
gulp.task("copy-static", (done) => {
gulp.task("copy-static-app", async () => {
const staticDir = paths.static;
// Basic static files
fs.copySync(polyPath("public"), paths.root);
copyLoaderJS(staticDir);
copyPolyfills(staticDir);
copyFonts(staticDir);
copyTranslations(staticDir);
@@ -90,10 +96,9 @@ gulp.task("copy-static", (done) => {
// Panel assets
copyMapPanel(staticDir);
done();
});
gulp.task("copy-static-demo", (done) => {
gulp.task("copy-static-demo", async () => {
// Copy app static files
fs.copySync(
polyPath("public/static"),
@@ -102,28 +107,29 @@ gulp.task("copy-static-demo", (done) => {
// Copy demo static files
fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_root);
copyLoaderJS(paths.demo_static);
copyPolyfills(paths.demo_static);
copyMapPanel(paths.demo_static);
copyFonts(paths.demo_static);
copyTranslations(paths.demo_static);
copyMdiIcons(paths.demo_static);
done();
});
gulp.task("copy-static-cast", (done) => {
gulp.task("copy-static-cast", async () => {
// Copy app static files
fs.copySync(polyPath("public/static"), paths.cast_static);
// Copy cast static files
fs.copySync(path.resolve(paths.cast_dir, "public"), paths.cast_root);
copyLoaderJS(paths.cast_static);
copyPolyfills(paths.cast_static);
copyMapPanel(paths.cast_static);
copyFonts(paths.cast_static);
copyTranslations(paths.cast_static);
copyMdiIcons(paths.cast_static);
done();
});
gulp.task("copy-static-gallery", (done) => {
gulp.task("copy-static-gallery", async () => {
// Copy app static files
fs.copySync(polyPath("public/static"), paths.gallery_static);
// Copy gallery static files
@@ -133,5 +139,4 @@ gulp.task("copy-static-gallery", (done) => {
copyFonts(paths.gallery_static);
copyTranslations(paths.gallery_static);
copyMdiIcons(paths.gallery_static);
done();
});