Skip to content

Commit

Permalink
cleanup README
Browse files Browse the repository at this point in the history
Signed-off-by: StoneyDSP <nathanjhood@googlemail.com>
  • Loading branch information
nathanjhood committed Oct 17, 2024
1 parent 690d896 commit 928cb42
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ Powered by Typescript, TailwindCSS, ESBuild, and fast-refreshing development ser

## How to...

### `serve ./public`
Step by step!

### `start`

```sh
$ git clone git@github.com:nathanjhood/ts-web-components.git
Expand Down Expand Up @@ -190,7 +192,7 @@ window.customElements.define('app-component',
super();
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<slot>Your app goes here</slot>`;
document.getElementById("root")?.appendChild(this);
document.getElementById("root")?.appendChild(this);
}
}
);
Expand Down Expand Up @@ -257,7 +259,7 @@ class AppComponent extends HTMLElement {
super();
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = this.render('Your app goes here');
document.getElementById("root")?.appendChild(this);
document.getElementById("root")?.appendChild(this);
}
render(message) {
return `<slot>${message}</slot>`;
Expand All @@ -273,12 +275,12 @@ class AppComponent extends HTMLElement {
class AppComponent extends HTMLElement {
constructor() {
super();
this.setup();
this.setup();
}
setup() {
this.attachShadow({ mode: 'open' });
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = this.render('Your app goes here');
document.getElementById("root")?.appendChild(this);
document.getElementById("root")?.appendChild(this);
}
render(message) {
return `<slot>${message}</slot>`;
Expand Down

0 comments on commit 928cb42

Please sign in to comment.