Thanks @Ludeeus
No errors on bundling now, but still issues when trying to load it on the front-end
This commit is contained in:
Ian Richardson
2019-02-23 15:14:07 -06:00
parent 505c1841d3
commit 5a42d9644c
5 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
/node_modules/
/.rts2_cache_umd/
yarn.lock
/dist/BOILERPLATE-card.js.map
/dist/boilerplate-card.js.map
/dist/index.d.ts
+2 -2
View File
File diff suppressed because one or more lines are too long
+2
View File
File diff suppressed because one or more lines are too long
+7 -7
View File
@@ -8,16 +8,16 @@ import {
css
} from "lit-element";
interface BOILERPLATEConfig {
interface BoilerplateConfig {
type: string;
}
@customElement("BOILERPLATE-card")
class BOILERPLATECard extends LitElement {
@customElement("boilerplate-card")
class BoilerplateCard extends LitElement {
@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) {
// TODO Log error
}
@@ -31,7 +31,7 @@ class BOILERPLATECard extends LitElement {
}
return html`
<div>BOILERPLATE</div>
<div>boilerplate</div>
`;
}
@@ -42,6 +42,6 @@ class BOILERPLATECard extends LitElement {
declare global {
interface HTMLElementTagNameMap {
"BOILERPLATE-card": BOILERPLATECard;
"boilerplate-card": BoilerplateCard;
}
}
+4 -4
View File
@@ -1,5 +1,5 @@
{
"name": "BOILERPLATE-card",
"name": "boilerplate-card",
"version": "1.0.0",
"description": "A templatable config pass-through",
"keywords": [
@@ -10,8 +10,8 @@
"lovelace",
"custom-cards"
],
"umd:main": "BOILERPLATE-card.js",
"repository": "git@github.com:custom_cards/BOILERPLATE-card.git",
"umd:main": "boilerplate-card.js",
"repository": "git@github.com:custom_cards/boilerplate-card.git",
"author": "Ian Richardson <iantrich@gmail.com>",
"license": "MIT",
"dependencies": {
@@ -29,7 +29,7 @@
},
"scripts": {
"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"
}
}