Skip to content

Commit

Permalink
Remove .js from imports (#1948)
Browse files Browse the repository at this point in the history
* Remove .js from lovelace

Also cleaned up some trailing whitespace

* Go big or go home

* More removals

* Revert changes to gallery webpack

* Revert changes to webpack.config.js
  • Loading branch information
iantrich authored and balloob committed Nov 2, 2018
1 parent eb505d4 commit c0c7c0f
Show file tree
Hide file tree
Showing 401 changed files with 9,114 additions and 9,117 deletions.
14 changes: 7 additions & 7 deletions gallery/src/components/demo-card.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";
import JsYaml from "js-yaml";

import HomeAssistant from "../data/hass.js";
import { demoConfig } from "../data/demo_config.js";
import HomeAssistant from "../data/hass";
import { demoConfig } from "../data/demo_config";
import { demoServices } from "../data/demo_services";
import demoResources from "../data/demo_resources.js";
import demoStates from "../data/demo_states.js";
import createCardElement from "../../../src/panels/lovelace/common/create-card-element.js";
import demoResources from "../data/demo_resources";
import demoStates from "../data/demo_states";
import createCardElement from "../../../src/panels/lovelace/common/create-card-element";

class DemoCard extends PolymerElement {
static get template() {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/components/demo-cards.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import "@polymer/app-layout/app-toolbar/app-toolbar.js";
import "@polymer/paper-toggle-button/paper-toggle-button.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";
import "@polymer/app-layout/app-toolbar/app-toolbar";
import "@polymer/paper-toggle-button/paper-toggle-button";

import "./demo-card.js";
import "./demo-card";

class DemoCards extends PolymerElement {
static get template() {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/components/demo-more-info.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../../../src/state-summary/state-card-content.js";
import "../../../src/dialogs/more-info/controls/more-info-content.js";
import "../../../src/components/ha-card.js";
import "../../../src/state-summary/state-card-content";
import "../../../src/dialogs/more-info/controls/more-info-content";
import "../../../src/components/ha-card";

class DemoMoreInfo extends PolymerElement {
static get template() {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/components/demo-more-infos.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import "@polymer/app-layout/app-toolbar/app-toolbar.js";
import "@polymer/paper-toggle-button/paper-toggle-button.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";
import "@polymer/app-layout/app-toolbar/app-toolbar";
import "@polymer/paper-toggle-button/paper-toggle-button";

import "./demo-more-info.js";
import "./demo-more-info";

class DemoMoreInfos extends PolymerElement {
static get template() {
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/data/provide_hass.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fireEvent } from "../../../src/common/dom/fire_event.js";
import { fireEvent } from "../../../src/common/dom/fire_event";

import { demoConfig } from "./demo_config.js";
import { demoConfig } from "./demo_config";
import { demoServices } from "./demo_services";
import demoResources from "./demo_resources.js";
import demoResources from "./demo_resources";

const ensureArray = (val) => (Array.isArray(val) ? val : [val]);

Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-alarm-panel-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("alarm_control_panel", "alarm", "disarmed", {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-conditional-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("light", "controller_1", "on", {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-entities-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("light", "bed_light", "on", {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-entity-button-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("light", "bed_light", "on", {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-entity-filter-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("device_tracker", "demo_paulus", "work", {
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/demos/demo-hui-gauge-card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../components/demo-cards.js";
import "../components/demo-cards";

const CONFIGS = [
{
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-glance-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("device_tracker", "demo_paulus", "home", {
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/demos/demo-hui-iframe-card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../components/demo-cards.js";
import "../components/demo-cards";

const CONFIGS = [
{
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-light-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("light", "bed_light", "on", {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-map-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("device_tracker", "demo_paulus", "not_home", {
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/demos/demo-hui-markdown-card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../components/demo-cards.js";
import "../components/demo-cards";

const CONFIGS = [
{
Expand Down
12 changes: 6 additions & 6 deletions gallery/src/demos/demo-hui-media-player-rows.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("media_player", "bedroom", "playing", {
Expand Down Expand Up @@ -65,7 +65,7 @@ const CONFIGS = [
- entity: media_player.living_room
name: Pause, No skip, tvshow
- entity: media_player.android_cast
name: Screen casting
name: Screen casting
- entity: media_player.lounge_room
name: Chromcast Idle
- entity: media_player.theater
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-picture-elements-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("light", "bed_light", "on", {
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/demos/demo-hui-picture-entity-card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../components/demo-cards.js";
import "../components/demo-cards";

const CONFIGS = [
{
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/demos/demo-hui-picture-glance-card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../components/demo-cards.js";
import "../components/demo-cards";

const CONFIGS = [
{
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-stack-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("light", "kitchen_lights", "on", {
Expand Down
10 changes: 5 additions & 5 deletions gallery/src/demos/demo-hui-thermostat-card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import "../components/demo-cards.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";
import "../components/demo-cards";

const ENTITIES = [
getEntity("climate", "ecobee", "auto", {
Expand Down
14 changes: 7 additions & 7 deletions gallery/src/demos/demo-more-info-light.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../../../src/dialogs/more-info/controls/more-info-content.js";
import "../../../src/components/ha-card.js";
import "../../../src/dialogs/more-info/controls/more-info-content";
import "../../../src/components/ha-card";

import getEntity from "../data/entity.js";
import provideHass from "../data/provide_hass.js";
import getEntity from "../data/entity";
import provideHass from "../data/provide_hass";

import "../components/demo-more-infos.js";
import "../components/demo-more-infos";

/* eslint-disable no-unused-vars */

Expand Down
16 changes: 8 additions & 8 deletions gallery/src/entrypoint.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import "@polymer/paper-styles/typography.js";
import "@polymer/polymer/lib/elements/dom-if.js";
import "@polymer/polymer/lib/elements/dom-repeat.js";
import "@polymer/paper-styles/typography";
import "@polymer/polymer/lib/elements/dom-if";
import "@polymer/polymer/lib/elements/dom-repeat";

import "../../src/resources/hass-icons.js";
import "../../src/resources/ha-style.js";
import "../../src/resources/roboto.js";
import "../../src/components/ha-iconset-svg.js";
import "../../src/resources/hass-icons";
import "../../src/resources/ha-style";
import "../../src/resources/roboto";
import "../../src/components/ha-iconset-svg";

import "./ha-gallery.js";
import "./ha-gallery";

document.body.appendChild(document.createElement("ha-gallery"));
24 changes: 12 additions & 12 deletions gallery/src/ha-gallery.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import "@polymer/app-layout/app-header-layout/app-header-layout.js";
import "@polymer/app-layout/app-header/app-header.js";
import "@polymer/app-layout/app-toolbar/app-toolbar.js";
import "@polymer/iron-icon/iron-icon.js";
import "@polymer/paper-card/paper-card.js";
import "@polymer/paper-item/paper-item.js";
import "@polymer/paper-item/paper-item-body.js";
import "@polymer/paper-icon-button/paper-icon-button.js";
import { html } from "@polymer/polymer/lib/utils/html-tag.js";
import { PolymerElement } from "@polymer/polymer/polymer-element.js";

import "../../src/managers/notification-manager.js";
import "@polymer/app-layout/app-header-layout/app-header-layout";
import "@polymer/app-layout/app-header/app-header";
import "@polymer/app-layout/app-toolbar/app-toolbar";
import "@polymer/iron-icon/iron-icon";
import "@polymer/paper-card/paper-card";
import "@polymer/paper-item/paper-item";
import "@polymer/paper-item/paper-item-body";
import "@polymer/paper-icon-button/paper-icon-button";
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";

import "../../src/managers/notification-manager";

const DEMOS = require.context("./demos", true, /^(.*\.(js$))[^.]*$/im);

Expand Down
Loading

0 comments on commit c0c7c0f

Please sign in to comment.