webserial-core 2.0.0-dev.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo-style.css +255 -0
- package/dist/demos/assets/demo-shared-DLFsukQx.css +1 -0
- package/dist/demos/assets/demo-shared-DnvFynUr.js +272 -0
- package/dist/demos/assets/web-bluetooth-VVwTClLx.js +1 -0
- package/dist/demos/assets/web-serial-CsBUUDvz.js +1 -0
- package/dist/demos/assets/web-usb-D7sSHjku.js +1 -0
- package/dist/demos/assets/websocket-DREvCVt-.js +1 -0
- package/dist/demos/web-bluetooth.html +408 -0
- package/dist/demos/web-serial.html +483 -0
- package/dist/demos/web-usb.html +526 -0
- package/dist/demos/websocket.html +498 -0
- package/dist/dist/webserial-core.umd.js +1 -0
- package/dist/favicon.svg +10 -0
- package/dist/images/cover.svg +145 -0
- package/dist/images/icons/adapters.svg +13 -0
- package/dist/images/icons/events.svg +4 -0
- package/dist/images/icons/parsers.svg +7 -0
- package/dist/images/icons/queue.svg +8 -0
- package/dist/images/icons/reconnect.svg +7 -0
- package/dist/images/icons/typed.svg +5 -0
- package/dist/images/logo.svg +10 -0
- package/dist/robots.txt +4 -0
- package/dist/types/index.d.ts +6 -30
- package/package.json +5 -4
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 420" width="800" height="420" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="800" y2="420" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0%" stop-color="#0f0f12"/>
|
|
5
|
+
<stop offset="100%" stop-color="#1a1527"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="wire" x1="0" y1="0" x2="1" y2="0">
|
|
8
|
+
<stop offset="0%" stop-color="#6366f1"/>
|
|
9
|
+
<stop offset="50%" stop-color="#a78bfa"/>
|
|
10
|
+
<stop offset="100%" stop-color="#22c55e"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="wirereverse" x1="1" y1="0" x2="0" y2="0">
|
|
13
|
+
<stop offset="0%" stop-color="#22c55e"/>
|
|
14
|
+
<stop offset="50%" stop-color="#a78bfa"/>
|
|
15
|
+
<stop offset="100%" stop-color="#6366f1"/>
|
|
16
|
+
</linearGradient>
|
|
17
|
+
</defs>
|
|
18
|
+
|
|
19
|
+
<!-- Background -->
|
|
20
|
+
<rect width="800" height="420" fill="url(#bg)" rx="16"/>
|
|
21
|
+
|
|
22
|
+
<!-- Subtle grid dots -->
|
|
23
|
+
<g opacity="0.07" fill="#a78bfa">
|
|
24
|
+
<circle cx="80" cy="60" r="1.5"/><circle cx="160" cy="60" r="1.5"/><circle cx="240" cy="60" r="1.5"/>
|
|
25
|
+
<circle cx="80" cy="130" r="1.5"/><circle cx="160" cy="130" r="1.5"/><circle cx="240" cy="130" r="1.5"/>
|
|
26
|
+
<circle cx="80" cy="200" r="1.5"/><circle cx="160" cy="200" r="1.5"/><circle cx="240" cy="200" r="1.5"/>
|
|
27
|
+
<circle cx="560" cy="60" r="1.5"/><circle cx="640" cy="60" r="1.5"/><circle cx="720" cy="60" r="1.5"/>
|
|
28
|
+
<circle cx="560" cy="130" r="1.5"/><circle cx="640" cy="130" r="1.5"/><circle cx="720" cy="130" r="1.5"/>
|
|
29
|
+
<circle cx="560" cy="200" r="1.5"/><circle cx="640" cy="200" r="1.5"/><circle cx="720" cy="200" r="1.5"/>
|
|
30
|
+
</g>
|
|
31
|
+
|
|
32
|
+
<!-- ─────── BROWSER WINDOW (left) ─────── -->
|
|
33
|
+
<rect x="40" y="60" width="240" height="185" rx="10" fill="#18181b" stroke="#27272a" stroke-width="1.5"/>
|
|
34
|
+
<!-- Title bar -->
|
|
35
|
+
<rect x="40" y="60" width="240" height="30" rx="10" fill="#27272a"/>
|
|
36
|
+
<rect x="40" y="75" width="240" height="15" fill="#27272a"/>
|
|
37
|
+
<!-- Traffic lights -->
|
|
38
|
+
<circle cx="58" cy="75" r="5" fill="#ef4444"/>
|
|
39
|
+
<circle cx="76" cy="75" r="5" fill="#f59e0b"/>
|
|
40
|
+
<circle cx="94" cy="75" r="5" fill="#22c55e"/>
|
|
41
|
+
<!-- Code lines (browser body) -->
|
|
42
|
+
<!-- import line -->
|
|
43
|
+
<rect x="56" y="106" width="80" height="7" rx="3" fill="#6366f1" opacity="0.7"/>
|
|
44
|
+
<rect x="142" y="106" width="40" height="7" rx="3" fill="#a78bfa" opacity="0.7"/>
|
|
45
|
+
<rect x="188" y="106" width="50" height="7" rx="3" fill="#e4e4e7" opacity="0.2"/>
|
|
46
|
+
<!-- class line -->
|
|
47
|
+
<rect x="56" y="122" width="42" height="7" rx="3" fill="#22c55e" opacity="0.7"/>
|
|
48
|
+
<rect x="104" y="122" width="68" height="7" rx="3" fill="#e4e4e7" opacity="0.3"/>
|
|
49
|
+
<rect x="178" y="122" width="38" height="7" rx="3" fill="#a78bfa" opacity="0.6"/>
|
|
50
|
+
<!-- method line -->
|
|
51
|
+
<rect x="72" y="138" width="95" height="7" rx="3" fill="#e4e4e7" opacity="0.2"/>
|
|
52
|
+
<rect x="174" y="138" width="48" height="7" rx="3" fill="#f59e0b" opacity="0.6"/>
|
|
53
|
+
<!-- body lines -->
|
|
54
|
+
<rect x="88" y="154" width="70" height="6" rx="3" fill="#e4e4e7" opacity="0.12"/>
|
|
55
|
+
<rect x="88" y="168" width="90" height="6" rx="3" fill="#e4e4e7" opacity="0.12"/>
|
|
56
|
+
<!-- bottom lines -->
|
|
57
|
+
<rect x="56" y="184" width="45" height="6" rx="3" fill="#22c55e" opacity="0.5"/>
|
|
58
|
+
<rect x="56" y="198" width="120" height="6" rx="3" fill="#e4e4e7" opacity="0.15"/>
|
|
59
|
+
<rect x="56" y="212" width="75" height="6" rx="3" fill="#a78bfa" opacity="0.4"/>
|
|
60
|
+
<!-- TypeScript badge -->
|
|
61
|
+
<rect x="232" y="192" width="28" height="18" rx="4" fill="#3b82f6"/>
|
|
62
|
+
<text x="246" y="205" text-anchor="middle" font-size="9" font-weight="700" fill="white" font-family="monospace,sans-serif">TS</text>
|
|
63
|
+
|
|
64
|
+
<!-- ─────── CONNECTION WIRES (center) ─────── -->
|
|
65
|
+
<!-- Top wire TX (browser → device) -->
|
|
66
|
+
<line x1="280" y1="155" x2="520" y2="155" stroke="url(#wire)" stroke-width="2.5" stroke-dasharray="8 4"/>
|
|
67
|
+
<polygon points="516,151 524,155 516,159" fill="#22c55e"/>
|
|
68
|
+
<!-- Bottom wire RX (device → browser) -->
|
|
69
|
+
<line x1="520" y1="180" x2="280" y2="180" stroke="url(#wirereverse)" stroke-width="2.5" stroke-dasharray="8 4"/>
|
|
70
|
+
<polygon points="284,176 276,180 284,184" fill="#6366f1"/>
|
|
71
|
+
|
|
72
|
+
<!-- Protocol icons along the wire -->
|
|
73
|
+
<!-- USB icon -->
|
|
74
|
+
<g transform="translate(340,130)" opacity="0.9">
|
|
75
|
+
<rect width="36" height="22" rx="6" fill="#18181b" stroke="#3b82f6" stroke-width="1.2"/>
|
|
76
|
+
<text x="18" y="15" text-anchor="middle" font-size="8" font-weight="600" fill="#60a5fa" font-family="sans-serif">USB</text>
|
|
77
|
+
</g>
|
|
78
|
+
<!-- BLE icon -->
|
|
79
|
+
<g transform="translate(382,130)" opacity="0.9">
|
|
80
|
+
<rect width="36" height="22" rx="6" fill="#18181b" stroke="#a78bfa" stroke-width="1.2"/>
|
|
81
|
+
<text x="18" y="15" text-anchor="middle" font-size="8" font-weight="600" fill="#c084fc" font-family="sans-serif">BLE</text>
|
|
82
|
+
</g>
|
|
83
|
+
<!-- WS icon -->
|
|
84
|
+
<g transform="translate(424,130)" opacity="0.9">
|
|
85
|
+
<rect width="36" height="22" rx="6" fill="#18181b" stroke="#22c55e" stroke-width="1.2"/>
|
|
86
|
+
<text x="18" y="15" text-anchor="middle" font-size="8" font-weight="600" fill="#4ade80" font-family="sans-serif">WS</text>
|
|
87
|
+
</g>
|
|
88
|
+
|
|
89
|
+
<!-- ─────── ARDUINO / MCU (right) ─────── -->
|
|
90
|
+
<!-- Board outline -->
|
|
91
|
+
<rect x="520" y="60" width="240" height="185" rx="10" fill="#0f2010" stroke="#1a4020" stroke-width="1.5"/>
|
|
92
|
+
<!-- PCB green body -->
|
|
93
|
+
<rect x="530" y="70" width="220" height="165" rx="6" fill="#14291a"/>
|
|
94
|
+
<!-- Chips -->
|
|
95
|
+
<rect x="588" y="90" width="64" height="50" rx="4" fill="#0f1f14" stroke="#22c55e" stroke-width="0.8"/>
|
|
96
|
+
<rect x="598" y="100" width="44" height="30" rx="2" fill="#030d05"/>
|
|
97
|
+
<text x="620" y="120" text-anchor="middle" font-size="7" fill="#22c55e" font-family="monospace,sans-serif" opacity="0.8">ATmega</text>
|
|
98
|
+
<!-- IC chip bottom -->
|
|
99
|
+
<rect x="588" y="155" width="64" height="35" rx="4" fill="#0f1f14" stroke="#22c55e" stroke-width="0.8"/>
|
|
100
|
+
<rect x="596" y="162" width="48" height="20" rx="2" fill="#030d05"/>
|
|
101
|
+
<text x="620" y="176" text-anchor="middle" font-size="7" fill="#22c55e" font-family="monospace,sans-serif" opacity="0.8">CP2102</text>
|
|
102
|
+
<!-- Pin headers (left side) -->
|
|
103
|
+
<g fill="#d4b483" opacity="0.7">
|
|
104
|
+
<rect x="534" y="90" width="6" height="6" rx="1"/>
|
|
105
|
+
<rect x="534" y="101" width="6" height="6" rx="1"/>
|
|
106
|
+
<rect x="534" y="112" width="6" height="6" rx="1"/>
|
|
107
|
+
<rect x="534" y="123" width="6" height="6" rx="1"/>
|
|
108
|
+
<rect x="534" y="134" width="6" height="6" rx="1"/>
|
|
109
|
+
<rect x="534" y="145" width="6" height="6" rx="1"/>
|
|
110
|
+
<rect x="534" y="156" width="6" height="6" rx="1"/>
|
|
111
|
+
<rect x="534" y="167" width="6" height="6" rx="1"/>
|
|
112
|
+
</g>
|
|
113
|
+
<!-- Pin headers (right side) -->
|
|
114
|
+
<g fill="#d4b483" opacity="0.7">
|
|
115
|
+
<rect x="740" y="90" width="6" height="6" rx="1"/>
|
|
116
|
+
<rect x="740" y="101" width="6" height="6" rx="1"/>
|
|
117
|
+
<rect x="740" y="112" width="6" height="6" rx="1"/>
|
|
118
|
+
<rect x="740" y="123" width="6" height="6" rx="1"/>
|
|
119
|
+
<rect x="740" y="134" width="6" height="6" rx="1"/>
|
|
120
|
+
<rect x="740" y="145" width="6" height="6" rx="1"/>
|
|
121
|
+
<rect x="740" y="156" width="6" height="6" rx="1"/>
|
|
122
|
+
<rect x="740" y="167" width="6" height="6" rx="1"/>
|
|
123
|
+
</g>
|
|
124
|
+
<!-- USB-B connector on right board -->
|
|
125
|
+
<rect x="696" y="80" width="22" height="16" rx="2" fill="#1c1c1c" stroke="#3f3f46" stroke-width="1"/>
|
|
126
|
+
<!-- LED indicators -->
|
|
127
|
+
<circle cx="548" cy="200" r="3.5" fill="#22c55e" opacity="0.9"/>
|
|
128
|
+
<circle cx="562" cy="200" r="3.5" fill="#ef4444" opacity="0.8"/>
|
|
129
|
+
<circle cx="576" cy="200" r="3.5" fill="#f59e0b" opacity="0.7"/>
|
|
130
|
+
|
|
131
|
+
<!-- ─────── LABEL ─────── -->
|
|
132
|
+
<text x="400" y="292" text-anchor="middle" font-size="22" font-weight="700" fill="#a78bfa" font-family="monospace,sans-serif" letter-spacing="1">webserial-core</text>
|
|
133
|
+
<text x="400" y="318" text-anchor="middle" font-size="12" fill="#71717a" font-family="sans-serif" letter-spacing="0.5">Type-safe · Event-driven · Multi-transport</text>
|
|
134
|
+
|
|
135
|
+
<!-- Decorative dots below label -->
|
|
136
|
+
<circle cx="340" cy="340" r="2.5" fill="#6366f1" opacity="0.5"/>
|
|
137
|
+
<circle cx="356" cy="340" r="2.5" fill="#a78bfa" opacity="0.6"/>
|
|
138
|
+
<circle cx="372" cy="340" r="2.5" fill="#a78bfa" opacity="0.8"/>
|
|
139
|
+
<circle cx="388" cy="340" r="2.5" fill="#a78bfa"/>
|
|
140
|
+
<circle cx="400" cy="340" r="3" fill="#a78bfa"/>
|
|
141
|
+
<circle cx="412" cy="340" r="2.5" fill="#a78bfa"/>
|
|
142
|
+
<circle cx="428" cy="340" r="2.5" fill="#a78bfa" opacity="0.8"/>
|
|
143
|
+
<circle cx="444" cy="340" r="2.5" fill="#22c55e" opacity="0.6"/>
|
|
144
|
+
<circle cx="460" cy="340" r="2.5" fill="#22c55e" opacity="0.5"/>
|
|
145
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="#a78bfa" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<!-- Left node (browser) -->
|
|
3
|
+
<circle cx="4.5" cy="12" r="2.5"/>
|
|
4
|
+
<!-- Hub (center) -->
|
|
5
|
+
<circle cx="12" cy="12" r="2" fill="#a78bfa" stroke="none"/>
|
|
6
|
+
<!-- Fan-out lines -->
|
|
7
|
+
<line x1="7" y1="12" x2="10" y2="12"/>
|
|
8
|
+
<line x1="6.3" y1="9.7" x2="10.3" y2="10.7"/>
|
|
9
|
+
<line x1="6.3" y1="14.3" x2="10.3" y2="13.3"/>
|
|
10
|
+
<!-- Right node (device) -->
|
|
11
|
+
<line x1="14" y1="12" x2="19.5" y2="12"/>
|
|
12
|
+
<rect x="19.5" y="9.5" width="3" height="5" rx="1" fill="#a78bfa" stroke="none"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="#f59e0b" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<!-- Lightning bolt / event signal -->
|
|
3
|
+
<polygon points="13,2 4,13.5 11.5,13.5 11,22 20,10.5 12.5,10.5" fill="#f59e0b" stroke="none"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="#06b6d4" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<!-- Code angle brackets (parser / transform) -->
|
|
3
|
+
<polyline points="15,18 21,12 15,6"/>
|
|
4
|
+
<polyline points="9,6 3,12 9,18"/>
|
|
5
|
+
<!-- Dashes in the middle = data stream -->
|
|
6
|
+
<line x1="13" y1="12" x2="11" y2="12" stroke="#06b6d4" stroke-dasharray="1.5 1.5"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="#a78bfa" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<!-- FIFO queue: three horizontal bars + right arrow -->
|
|
3
|
+
<rect x="2" y="4" width="15" height="3.5" rx="1.5"/>
|
|
4
|
+
<rect x="2" y="10" width="15" height="3.5" rx="1.5"/>
|
|
5
|
+
<rect x="2" y="16" width="15" height="3.5" rx="1.5"/>
|
|
6
|
+
<!-- Arrow pointing out (command dispatch) -->
|
|
7
|
+
<polyline points="18,8 22,12 18,16" stroke="#22c55e" stroke-width="2"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="#22c55e" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<!-- Circular arrows (reconnect/refresh) -->
|
|
3
|
+
<path d="M4.5 12a7.5 7.5 0 0 1 13.3-4.8"/>
|
|
4
|
+
<polyline points="22,5 18,7 16,3"/>
|
|
5
|
+
<path d="M19.5 12a7.5 7.5 0 0 1-13.3 4.8"/>
|
|
6
|
+
<polyline points="2,19 6,17 8,21"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="28" height="28" fill="none">
|
|
2
|
+
<!-- TypeScript-style shield with TS label -->
|
|
3
|
+
<rect x="3" y="2" width="18" height="20" rx="4" fill="#3b82f6"/>
|
|
4
|
+
<text x="12" y="16" text-anchor="middle" font-size="9" font-weight="700" fill="white" font-family="monospace,sans-serif">TS</text>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" fill="none">
|
|
2
|
+
<!-- Dark circle background -->
|
|
3
|
+
<circle cx="20" cy="20" r="19" fill="#1a1527"/>
|
|
4
|
+
<!-- Left angle bracket -->
|
|
5
|
+
<polyline points="10,13 6,20 10,27" stroke="#a78bfa" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<!-- Right angle bracket -->
|
|
7
|
+
<polyline points="30,13 34,20 30,27" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<!-- Serial data line (dashes) -->
|
|
9
|
+
<line x1="14" y1="20" x2="26" y2="20" stroke="#a78bfa" stroke-width="2" stroke-dasharray="3 2" stroke-linecap="round"/>
|
|
10
|
+
</svg>
|
package/dist/robots.txt
ADDED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
1
|
import { AbstractSerialDevice } from '../core/AbstractSerialDevice.js';
|
|
2
|
-
declare global {
|
|
3
|
-
interface SerialPortInfo {
|
|
4
|
-
usbVendorId?: number;
|
|
5
|
-
usbProductId?: number;
|
|
6
|
-
}
|
|
7
|
-
interface SerialPort {
|
|
8
|
-
readable: ReadableStream<Uint8Array> | null;
|
|
9
|
-
writable: WritableStream<Uint8Array> | null;
|
|
10
|
-
getInfo(): SerialPortInfo;
|
|
11
|
-
open(options: SerialOptions): Promise<void>;
|
|
12
|
-
close(): Promise<void>;
|
|
13
|
-
forget?(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
interface SerialOptions {
|
|
16
|
-
baudRate: number;
|
|
17
|
-
dataBits?: number;
|
|
18
|
-
stopBits?: number;
|
|
19
|
-
parity?: "none" | "even" | "odd";
|
|
20
|
-
bufferSize?: number;
|
|
21
|
-
flowControl?: "none" | "hardware";
|
|
22
|
-
}
|
|
23
|
-
interface Navigator {
|
|
24
|
-
serial?: {
|
|
25
|
-
requestPort(options?: {
|
|
26
|
-
filters?: SerialPortFilter[];
|
|
27
|
-
}): Promise<SerialPort>;
|
|
28
|
-
getPorts(): Promise<SerialPort[]>;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
2
|
export interface SerialPortFilter {
|
|
33
3
|
usbVendorId?: number;
|
|
34
4
|
usbProductId?: number;
|
|
@@ -98,6 +68,12 @@ export interface SerialDeviceOptions<T> {
|
|
|
98
68
|
bufferSize?: number;
|
|
99
69
|
flowControl?: "none" | "hardware";
|
|
100
70
|
commandTimeout?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Parser that transforms raw `Uint8Array` chunks into the device data type `T`.
|
|
73
|
+
* Use `delimiter()` for line-based text protocols, `raw()` or `fixedLength()`
|
|
74
|
+
* for binary data (declare the device as `AbstractSerialDevice<Uint8Array>`),
|
|
75
|
+
* or any custom `SerialParser<T>`.
|
|
76
|
+
*/
|
|
101
77
|
parser?: SerialParser<T>;
|
|
102
78
|
/** Enable automatic reconnection when the device disconnects unexpectedly. */
|
|
103
79
|
autoReconnect?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webserial-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"author": "danidoble",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"hardware"
|
|
53
53
|
],
|
|
54
54
|
"license": "MIT",
|
|
55
|
-
"homepage": "https://
|
|
55
|
+
"homepage": "https://webserial.dev/",
|
|
56
56
|
"bugs": {
|
|
57
57
|
"url": "https://github.com/danidoble/webserial-core/issues"
|
|
58
58
|
},
|
|
@@ -65,9 +65,10 @@
|
|
|
65
65
|
"preview": "vite preview",
|
|
66
66
|
"lint": "eslint . --fix",
|
|
67
67
|
"format": "prettier ./demos ./docs ./scripts ./src ./tests --write",
|
|
68
|
-
"
|
|
68
|
+
"demos:build": "node scripts/build-demos.mjs",
|
|
69
|
+
"docs:prepare": "vite build && node scripts/prepare-docs.mjs && node scripts/build-demos.mjs",
|
|
69
70
|
"docs:dev": "vitepress dev docs",
|
|
70
|
-
"docs:build": "vite build && node scripts/prepare-docs.mjs && vitepress build docs",
|
|
71
|
+
"docs:build": "vite build && node scripts/prepare-docs.mjs && node scripts/build-demos.mjs && vitepress build docs",
|
|
71
72
|
"docs:preview": "vitepress preview docs",
|
|
72
73
|
"docs:index": "node scripts/algolia-index.mjs",
|
|
73
74
|
"release": "node scripts/publish.mjs",
|