progress
Thanks @Ludeeus No errors on bundling now, but still issues when trying to load it on the front-end
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/.rts2_cache_umd/
|
/.rts2_cache_umd/
|
||||||
yarn.lock
|
yarn.lock
|
||||||
/dist/BOILERPLATE-card.js.map
|
/dist/boilerplate-card.js.map
|
||||||
/dist/index.d.ts
|
/dist/index.d.ts
|
||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
@@ -8,16 +8,16 @@ import {
|
|||||||
css
|
css
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
|
||||||
interface BOILERPLATEConfig {
|
interface BoilerplateConfig {
|
||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@customElement("BOILERPLATE-card")
|
@customElement("boilerplate-card")
|
||||||
class BOILERPLATECard extends LitElement {
|
class BoilerplateCard extends LitElement {
|
||||||
@property() public hass?: any;
|
@property() public hass?: any;
|
||||||
@property() private _config?: BOILERPLATEConfig;
|
@property() private _config?: BoilerplateConfig;
|
||||||
|
|
||||||
public setConfig(config: BOILERPLATEConfig): void {
|
public setConfig(config: BoilerplateConfig): void {
|
||||||
if (!this._config) {
|
if (!this._config) {
|
||||||
// TODO Log error
|
// TODO Log error
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ class BOILERPLATECard extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div>BOILERPLATE</div>
|
<div>boilerplate</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +42,6 @@ class BOILERPLATECard extends LitElement {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"BOILERPLATE-card": BOILERPLATECard;
|
"boilerplate-card": BoilerplateCard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "BOILERPLATE-card",
|
"name": "boilerplate-card",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A templatable config pass-through",
|
"description": "A templatable config pass-through",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
"lovelace",
|
"lovelace",
|
||||||
"custom-cards"
|
"custom-cards"
|
||||||
],
|
],
|
||||||
"umd:main": "BOILERPLATE-card.js",
|
"umd:main": "boilerplate-card.js",
|
||||||
"repository": "git@github.com:custom_cards/BOILERPLATE-card.git",
|
"repository": "git@github.com:custom_cards/boilerplate-card.git",
|
||||||
"author": "Ian Richardson <iantrich@gmail.com>",
|
"author": "Ian Richardson <iantrich@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "microbundle watch",
|
"start": "microbundle watch",
|
||||||
"build": "npm run lint && microbundle --globals lit-element --target browser --format umd",
|
"build": "npm run lint && microbundle --external litElement --target browser --format umd",
|
||||||
"lint": "tslint index.ts"
|
"lint": "tslint index.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user