Skip to content

Commit

Permalink
Minify ha-style/Roboto and load asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep committed Oct 15, 2023
1 parent 37ef444 commit b7e5a09
Show file tree
Hide file tree
Showing 12 changed files with 572 additions and 572 deletions.
4 changes: 2 additions & 2 deletions cast/src/launcher/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "../../../src/resources/safari-14-attachshadow-patch";
import "../../../src/resources/ha-style";
import "../../../src/resources/roboto";
import "./layout/hc-connect";

import("../../../src/resources/ha-style");
4 changes: 2 additions & 2 deletions cast/src/receiver/second-load.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import "../../../src/resources/ha-style";
import "../../../src/resources/roboto";
import "./layout/hc-lovelace";

import("../../../src/resources/ha-style");
4 changes: 2 additions & 2 deletions demo/src/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "../../src/resources/ha-style";
import "../../src/resources/roboto";
import "../../src/resources/safari-14-attachshadow-patch";
import "./ha-demo";

import("../../src/resources/ha-style");
4 changes: 2 additions & 2 deletions gallery/src/entrypoint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "../../src/resources/ha-style";
import "../../src/resources/roboto";
import "./ha-gallery";

import("../../src/resources/ha-style");

document.body.appendChild(document.createElement("ha-gallery"));
6 changes: 3 additions & 3 deletions hassio/src/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Compat needs to be first import
import "../../src/resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
import "../../src/resources/roboto";
import "../../src/resources/ha-style";
import "../../src/resources/safari-14-attachshadow-patch";
import "./hassio-main";

import("../../src/resources/ha-style");

setCancelSyntheticClickEvents(false);

const styleEl = document.createElement("style");
styleEl.innerHTML = `
styleEl.textContent = `
body {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
Expand Down
4 changes: 2 additions & 2 deletions src/entrypoints/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
} from "@polymer/polymer/lib/utils/settings";
import "@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min";
import "../layouts/home-assistant";
import "../resources/ha-style";
import "../resources/roboto";

import("../resources/ha-style");

setPassiveTouchGestures(true);
setCancelSyntheticClickEvents(false);
4 changes: 2 additions & 2 deletions src/entrypoints/authorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import "../resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
import "../auth/ha-authorize";
import "../resources/ha-style";
import "../resources/roboto";
import "../resources/safari-14-attachshadow-patch";
import "../resources/array.flat.polyfill";

import("../resources/ha-style");

setCancelSyntheticClickEvents(false);
4 changes: 2 additions & 2 deletions src/entrypoints/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import "../resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
import "../onboarding/ha-onboarding";
import "../resources/ha-style";
import "../resources/roboto";
import "../resources/safari-14-attachshadow-patch";
import "../resources/array.flat.polyfill";

import("../resources/ha-style");

setCancelSyntheticClickEvents(false);

declare global {
Expand Down
Loading

0 comments on commit b7e5a09

Please sign in to comment.