Skip to content

Commit c53451e

Browse files
committed
chore: format
1 parent e8ac220 commit c53451e

File tree

14 files changed

+34
-22
lines changed

14 files changed

+34
-22
lines changed

examples/basic/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defineConfig } from 'vite'
22
import Userscript from 'vite-userscript-plugin'
3+
34
import { name, version } from './package.json'
45

56
export default defineConfig((config) => {
@@ -19,6 +20,7 @@ export default defineConfig((config) => {
1920
minify: false
2021
}
2122
})
23+
2224
]
2325
}
2426
})

examples/jsx/src/App.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { mount, unmount } from 'redom-jsx'
2-
import { Counter } from './Counter.js'
32
import type { RedomComponent, RedomEl } from 'redom-jsx'
43

4+
import { Counter } from './Counter.js'
5+
56
export class App implements RedomComponent {
67
el: RedomEl
78

@@ -10,7 +11,7 @@ export class App implements RedomComponent {
1011

1112
constructor() {
1213
// prettier-ignore
13-
<div this="el">
14+
;<div this="el">
1415
<Counter
1516
this="counter"
1617
initialValue={-10}

examples/jsx/src/Counter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ export class Counter implements RedomComponent {
3838

3939
private render(): void {
4040
// prettier-ignore
41-
<h1 this="el"></h1>
41+
;<h1 this="el"></h1>
4242
}
4343
}

examples/jsx/src/Heading.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { RedomElement, router } from 'redom-jsx'
1+
import { router } from 'redom-jsx'
22
import type { RedomComponent, RedomEl, Router } from 'redom-jsx'
33

44
class H1 implements RedomComponent {
55
el: RedomEl
66

77
constructor() {
88
// prettier-ignore
9-
<h1 this="el">Lorem ipsum dolor sit amet. (h1)</h1>
9+
;<h1 this="el">Lorem ipsum dolor sit amet. (h1)</h1>
1010
}
1111
}
1212

@@ -15,7 +15,7 @@ class H2 implements RedomComponent {
1515

1616
constructor() {
1717
// prettier-ignore
18-
<h2 this="el">Lorem ipsum dolor sit amet. (h2)</h2>
18+
;<h2 this="el">Lorem ipsum dolor sit amet. (h2)</h2>
1919
}
2020
}
2121

examples/jsx/src/List.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Items implements RedomComponent {
4040

4141
private render(): void {
4242
// prettier-ignore
43-
<span this="el">{this.generateList()}</span>
43+
;<span this="el">{this.generateList()}</span>
4444
}
4545
}
4646

@@ -55,7 +55,7 @@ export class List implements RedomComponent {
5555

5656
private render(): void {
5757
// prettier-ignore
58-
<div this="el">
58+
;<div this="el">
5959
<h1 this="h1">List</h1>
6060
<Items this="items" count={5} />
6161
<button onclick={() => this.items.update()}>Update</button>

examples/jsx/src/Toggle.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { RedomComponent, RedomEl } from 'redom-jsx'
1+
import type { RedomComponent, RedomEl } from 'redom-jsx'
2+
23
import { Heading } from './Heading.js'
34

45
export class Toggle implements RedomComponent {
@@ -8,7 +9,7 @@ export class Toggle implements RedomComponent {
89

910
constructor() {
1011
// prettier-ignore
11-
<div this="el">
12+
;<div this="el">
1213
<Heading this="heading" />
1314
<button
1415
onclick={() => {

examples/jsx/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { mount } from 'redom-jsx'
2+
23
import { App } from './App.js'
34
import { List } from './List.js'
45
import { Toggle } from './Toggle.js'

examples/jsx/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'vite'
22
import Redom from 'vite-redom-jsx'
33
import Userscript from 'vite-userscript-plugin'
4+
45
import { name, version } from './package.json'
56

67
export default defineConfig((config) => {
@@ -16,8 +17,12 @@ export default defineConfig((config) => {
1617
},
1718
server: {
1819
port: 4000
20+
},
21+
esbuildTransformOptions: {
22+
minify: false
1923
}
2024
})
25+
2126
]
2227
}
2328
})

src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { dirname } from 'node:path'
22
import { fileURLToPath } from 'node:url'
3+
34
import type { Grants } from './types.js'
45

56
export const pluginDir = dirname(fileURLToPath(import.meta.url))

src/helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { transformWithEsbuild } from 'vite'
2+
import type { EsbuildTransformOptions } from 'vite'
3+
24
import { grants } from './constants.js'
35
import type { Grants, Transform } from './types.js'
4-
import type { EsbuildTransformOptions } from 'vite'
56

67
export function removeDuplicates(arr: any): any[] {
78
return [...new Set(Array.isArray(arr) ? arr : arr ? [arr] : [])]

0 commit comments

Comments
 (0)