mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-03 05:02:15 +02:00
Compare commits
1 Commits
5ae6bfdd35
...
db19b9cc4f
Author | SHA1 | Date | |
---|---|---|---|
db19b9cc4f |
@ -1,26 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
end_of_line = lf
|
|
||||||
indent_style = tab
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
max_line_length = 120
|
|
||||||
|
|
||||||
[*.json]
|
|
||||||
max_line_length = unset
|
|
||||||
|
|
||||||
[*.yml]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.md]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[LICENSE]
|
|
||||||
max_line_length = unset
|
|
||||||
|
|
||||||
[dist/**]
|
|
||||||
indent_style = unset
|
|
||||||
max_line_length = unset
|
|
||||||
trim_trailing_whitespace = unset
|
|
23
.github/workflows/pr.yml
vendored
23
.github/workflows/pr.yml
vendored
@ -1,23 +0,0 @@
|
|||||||
# https://nektosact.com/usage/index.html
|
|
||||||
# https://github.com/reviewdog/action-eclint
|
|
||||||
name: On PR
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pr:
|
|
||||||
name: Validates formatting and linting
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
||||||
- uses: reviewdog/action-eclint@d51e853275e707b64c0526881ada324f454c1110 # v1.7.1
|
|
||||||
with:
|
|
||||||
reporter: github-pr-check
|
|
||||||
eclint_flags: '--fix'
|
|
||||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
|
||||||
with:
|
|
||||||
node-version: 20.16
|
|
||||||
- run: npm ci
|
|
||||||
- run: bs/lint.sh
|
|
@ -2,7 +2,7 @@ import {
|
|||||||
customElementRender,
|
customElementRender,
|
||||||
customElementWithDDE,
|
customElementWithDDE,
|
||||||
observedAttributes,
|
observedAttributes,
|
||||||
el, on, scope,
|
el, on, scope
|
||||||
} from "deka-dom-el";
|
} from "deka-dom-el";
|
||||||
import { S } from "deka-dom-el/signals";
|
import { S } from "deka-dom-el/signals";
|
||||||
export class HTMLCustomElement extends HTMLElement{
|
export class HTMLCustomElement extends HTMLElement{
|
||||||
@ -24,7 +24,7 @@ export class HTMLCustomElement extends HTMLElement{
|
|||||||
/** @param {{ attr: ddeSignal<string, {}> }} props */
|
/** @param {{ attr: ddeSignal<string, {}> }} props */
|
||||||
function ddeComponent({ attr }){
|
function ddeComponent({ attr }){
|
||||||
scope.host(
|
scope.host(
|
||||||
on.connected(e=> console.log(( /** @type {HTMLParagraphElement} */ (e.target)).outerHTML)),
|
on.connected(e=> console.log(e.target.outerHTML)),
|
||||||
);
|
);
|
||||||
return el().append(
|
return el().append(
|
||||||
el("p", S(()=> `Hello from Custom Element with attribute '${attr()}'`))
|
el("p", S(()=> `Hello from Custom Element with attribute '${attr()}'`))
|
||||||
|
Reference in New Issue
Block a user