Skip to content

Commit a65701f

Browse files
Fix bug, standardize common scripts
1 parent 24f233f commit a65701f

6 files changed

Lines changed: 40 additions & 3 deletions

File tree

library/component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,9 @@ export const useTemplate = <
792792
configurable: true,
793793
enumerable: true,
794794
value(this: E) {
795-
return maybeCall(() => _connectedCallback && _connectedCallback.call(this))
795+
return maybeCall(() =>
796+
_connectedCallback && _connectedCallback.call(this)
797+
)
796798
.then(() => maybeCall<HTMLTemplateElement>(f))
797799
.then((template) => {
798800
if (!template) return;

scripts/build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
deno run --allow-all --config "$r/tsconfig.json" "$r/scripts/build.ts" "$@"

scripts/build.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ await build({
2626
},
2727
},
2828
shims: {
29-
// see JS docs for overview and more options
30-
deno: true,
29+
deno: false,
3130
},
3231
test: false,
3332
});

scripts/format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
if [ "$CI" == true ] || [ "$#" -eq 0 ]; then
7+
deno fmt --config "$r/tsconfig.json" "$r/library/"
8+
else
9+
deno fmt --config "$r/tsconfig.json" "$@"
10+
fi

scripts/lint

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
if [ "$CI" == true ] || [ "$#" -eq 0 ]; then
7+
deno lint --config "$r/tsconfig.json" "$r/library/"
8+
else
9+
deno lint --config "$r/tsconfig.json" "$@"
10+
fi

scripts/test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
r="$(git rev-parse --show-toplevel)"
5+
6+
if [ "$CI" == true ] || [ "$#" -eq 0 ]; then
7+
deno test --config "$r/tsconfig.json" --allow-all --no-check --unstable "$r/library/"
8+
else
9+
deno test --config "$r/tsconfig.json" --watch --allow-all --unstable "$@"
10+
fi

0 commit comments

Comments
 (0)