1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 20:55:49 +00:00

Add map to demo (#3295)

This commit is contained in:
Paulus Schoutsen
2019-06-21 11:05:01 -07:00
committed by GitHub
parent 3e8606781e
commit 88b9348a81
10 changed files with 55 additions and 1017 deletions

View File

@@ -51,6 +51,18 @@ function copyFonts(staticDir) {
fs.copySync(npmPath("@polymer/font-roboto-local/fonts"), staticPath("fonts"));
}
function copyMapPanel(staticDir) {
const staticPath = genStaticPath(staticDir);
copyFileDir(
npmPath("leaflet/dist/leaflet.css"),
staticPath("images/leaflet/")
);
fs.copySync(
npmPath("leaflet/dist/images"),
staticPath("images/leaflet/images/")
);
}
function compressStatic(staticDir) {
const staticPath = genStaticPath(staticDir);
const fonts = gulp
@@ -84,14 +96,7 @@ gulp.task("copy-static", (done) => {
npmPath("react-big-calendar/lib/css/react-big-calendar.css"),
staticPath("panels/calendar/")
);
copyFileDir(
npmPath("leaflet/dist/leaflet.css"),
staticPath("images/leaflet/")
);
fs.copySync(
npmPath("leaflet/dist/images"),
staticPath("images/leaflet/images/")
);
copyMapPanel(staticDir);
done();
});
@@ -104,6 +109,7 @@ gulp.task("copy-static-demo", (done) => {
fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_root);
copyPolyfills(paths.demo_static);
copyMapPanel(paths.demo_static);
copyFonts(paths.demo_static);
copyTranslations(paths.demo_static);
done();