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/
|
||||
/.rts2_cache_umd/
|
||||
yarn.lock
|
||||
/dist/BOILERPLATE-card.js.map
|
||||
/dist/boilerplate-card.js.map
|
||||
/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
|
||||
} 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
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user