refactor: use index exports

This commit is contained in:
Ayo 2023-12-08 14:45:12 +01:00
parent 703ef9e45d
commit b613d8e77c
7 changed files with 6 additions and 12 deletions

View file

@ -1,7 +1,5 @@
// @ts-check // @ts-check
import { WebComponent } from "../../src/WebComponent.js"; import { WebComponent, attachEffect } from "../../src/";
import { attachEffect } from "../../src/attach-effect.js";
export class Counter extends WebComponent { export class Counter extends WebComponent {
static properties = ["count"]; static properties = ["count"];
onInit() { onInit() {

View file

@ -1,6 +1,5 @@
// @ts-check // @ts-check
import { WebComponent } from "../../src/WebComponent.js"; import { WebComponent, attachEffect } from "../../src/";
import { attachEffect } from "../../src/attach-effect.js";
export class Decrease extends WebComponent { export class Decrease extends WebComponent {
static properties = ["count"]; static properties = ["count"];

View file

@ -1,4 +1,4 @@
import { WebComponent } from "../../src/WebComponent.js"; import { WebComponent } from "../../src";
export class BooleanPropTest extends WebComponent { export class BooleanPropTest extends WebComponent {
static properties = ["is-inline", "anotherone"]; static properties = ["is-inline", "anotherone"];

View file

@ -1,5 +1,5 @@
// @ts-check // @ts-check
import { WebComponent } from "../../src/WebComponent.js"; import { WebComponent } from "../../src";
export class Counter extends WebComponent { export class Counter extends WebComponent {
static properties = ["count"]; static properties = ["count"];

View file

@ -1,5 +1,5 @@
// @ts-check // @ts-check
import { WebComponent } from "../../src/WebComponent.js"; import { WebComponent } from "../../src";
export class HelloWorld extends WebComponent { export class HelloWorld extends WebComponent {
static properties = ["count", "emotion"]; static properties = ["count", "emotion"];

View file

@ -1,5 +1,5 @@
// @ts-check // @ts-check
import { WebComponent } from "../../src/WebComponent.js"; import { WebComponent } from "../../src"
class SimpleText extends WebComponent { class SimpleText extends WebComponent {
clickCallback() { clickCallback() {

View file

@ -70,9 +70,6 @@ export class WebComponent extends HTMLElement {
if (typeof this.template === "string") this.innerHTML = this.template; if (typeof this.template === "string") this.innerHTML = this.template;
} }
/**
* start HTMLElement callbacks
*/
constructor() { constructor() {
super(); super();
this.#initializeProps(); this.#initializeProps();