@pure-ds/core 0.5.49 → 0.5.51
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/types/public/assets/js/pds-manager.d.ts +2 -2
- package/dist/types/public/assets/js/pds.d.ts +3 -3
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/src/js/common/common.d.ts +0 -6
- package/dist/types/src/js/common/common.d.ts.map +1 -1
- package/dist/types/src/js/lit.d.ts +20 -2
- package/dist/types/src/js/lit.d.ts.map +1 -1
- package/dist/types/src/js/pds.d.ts +0 -33
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/templates/bootstrap/esbuild-dev.cjs +76 -85
- package/packages/pds-cli/bin/templates/bootstrap/esbuild-dev.mjs +69 -80
- package/public/assets/js/app.js +12 -12
- package/public/assets/js/lit.js +3 -3
- package/public/assets/js/pds-manager.js +4 -4
- package/public/assets/js/pds.js +6 -6
- package/public/assets/pds/external/lit.js +3 -3
- package/readme.md +2 -51
- package/src/js/pds.js +0 -22
- package/public/assets/pds/external/lit-lazy-props.js +0 -47
- package/public/assets/pds/external/lit-msg.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
declare function
|
|
1
|
+
export { st as startLive };
|
|
2
|
+
declare function st(n: any, t: any, { emitReady: e, applyResolvedTheme: r, setupSystemListenerIfNeeded: a }: {
|
|
3
3
|
emitReady: any;
|
|
4
4
|
applyResolvedTheme: any;
|
|
5
5
|
setupSystemListenerIfNeeded: any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var b: {
|
|
2
2
|
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
|
3
3
|
dispatchEvent(event: Event): boolean;
|
|
4
4
|
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
|
|
5
5
|
};
|
|
6
|
+
declare function Rt(e: any): void;
|
|
6
7
|
declare function $t(e: any): void;
|
|
7
|
-
|
|
8
|
-
export { g as PDS, $t as applyResolvedTheme, Tt as setupSystemListenerIfNeeded };
|
|
8
|
+
export { b as PDS, Rt as applyResolvedTheme, $t as setupSystemListenerIfNeeded };
|
|
9
9
|
//# sourceMappingURL=pds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":"AA+BisB;;;;EAAQ;
|
|
1
|
+
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":"AA+BisB;;;;EAAQ;AAA4kD,kCAAiX;AAAA,kCAAupB"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
export function isObject(item: any): boolean;
|
|
2
2
|
export function deepMerge(target: any, source: any): any;
|
|
3
|
-
/**
|
|
4
|
-
* Parse a HTML string into DOM nodes.
|
|
5
|
-
* @param {string} html
|
|
6
|
-
* @returns {Element[]}
|
|
7
|
-
*/
|
|
8
|
-
export function parseHTML(html: string): Element[];
|
|
9
3
|
/**
|
|
10
4
|
* Build a DocumentFragment from a template-like object (strings + values)
|
|
11
5
|
* @param {{strings: string[], values: unknown[]}} templateLike
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/js/common/common.js"],"names":[],"mappings":"AAAA,6CAEC;AAED,yDAeG;AAEH;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/js/common/common.js"],"names":[],"mappings":"AAAA,6CAEC;AAED,yDAeG;AAEH;;;;GAIG;AACH,uDAHW;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,GACpC,gBAAgB,CAwF5B"}
|
|
@@ -14,12 +14,30 @@ export { ifDefined } from "lit/directives/if-defined.js";
|
|
|
14
14
|
export { until } from "lit/directives/until.js";
|
|
15
15
|
export { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
16
16
|
export { unsafeSVG } from "lit/directives/unsafe-svg.js";
|
|
17
|
-
export { msg } from "./
|
|
18
|
-
|
|
17
|
+
export { msg } from "./common/msg.js";
|
|
18
|
+
/**
|
|
19
|
+
* Applies properties to an element after it's defined (for lazy-loaded components)
|
|
20
|
+
* @param {Object} props - Properties to set on the element
|
|
21
|
+
* @returns {import('lit/directive.js').DirectiveResult}
|
|
22
|
+
*/
|
|
23
|
+
export const lazyProps: (_props?: any) => import("lit-html/directive.js").DirectiveResult<typeof LazyPropsDirective>;
|
|
19
24
|
import { LitElement } from "lit";
|
|
20
25
|
import { nothing } from "lit";
|
|
21
26
|
import { svg } from "lit";
|
|
22
27
|
import { render } from "lit";
|
|
28
|
+
/**
|
|
29
|
+
* Directive that waits for a custom element to be defined before setting properties
|
|
30
|
+
* Useful for lazy-loaded web components
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* html`<pds-fab ${lazyProps({ satellites: [...], open: true })}></pds-fab>`
|
|
34
|
+
*/
|
|
35
|
+
declare class LazyPropsDirective extends Directive {
|
|
36
|
+
render(_props: any): symbol;
|
|
37
|
+
update(part: any, [props]: [any]): symbol;
|
|
38
|
+
#private;
|
|
39
|
+
}
|
|
40
|
+
import { Directive } from "lit/directive.js";
|
|
23
41
|
export { LitElement, nothing, svg, render };
|
|
24
42
|
export { ref, createRef } from "lit/directives/ref.js";
|
|
25
43
|
export { html as staticHtml, unsafeStatic } from "lit/static-html.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit.d.ts","sourceRoot":"","sources":["../../../../src/js/lit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lit.d.ts","sourceRoot":"","sources":["../../../../src/js/lit.js"],"names":[],"mappings":"AAiFA;;;GAGG;AACH,0DAMC;AAtFD,0CAA0C;AAC1C,mBADW,cAAc,OAAO,EAAE,IAAI,CACV;AAE5B,yCAAyC;AACzC,kBADW,cAAc,OAAO,EAAE,GAAG,CACX;;;;;;;;;AAiE1B;;;;GAIG;AACH,qHAAuD;2BA9E0B,KAAK;wBAAL,KAAK;oBAAL,KAAK;uBAAL,KAAK;AA4BtF;;;;;;GAMG;AACH;IAIE,4BAEC;IAED,0CAaC;;CAeF;0BA7CoC,kBAAkB"}
|
|
@@ -25,18 +25,6 @@ export type PDSAPI = {
|
|
|
25
25
|
* - Singleton runtime registry for live/static mode
|
|
26
26
|
*/
|
|
27
27
|
registry: import("./pds-core/pds-registry.js").PDSRegistry;
|
|
28
|
-
/**
|
|
29
|
-
* - Internal init guard (set while PDS.start is running)
|
|
30
|
-
*/
|
|
31
|
-
initializing: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* - Current preset id/name (legacy; may be null)
|
|
34
|
-
*/
|
|
35
|
-
currentPreset: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* - Enable verbose runtime logging
|
|
38
|
-
*/
|
|
39
|
-
debug: boolean;
|
|
40
28
|
/**
|
|
41
29
|
* - Apply generated styles to the document (live-only)
|
|
42
30
|
*/
|
|
@@ -78,33 +66,12 @@ export const PDS: PDSAPI & PDSBase;
|
|
|
78
66
|
*
|
|
79
67
|
* @typedef {Object} PDSAPI
|
|
80
68
|
* @property {import("./pds-core/pds-registry.js").PDSRegistry} registry - Singleton runtime registry for live/static mode
|
|
81
|
-
* @property {boolean} initializing - Internal init guard (set while PDS.start is running)
|
|
82
|
-
* @property {string|null} currentPreset - Current preset id/name (legacy; may be null)
|
|
83
|
-
* @property {boolean} debug - Enable verbose runtime logging
|
|
84
69
|
* @property {(generator?: import("./pds-core/pds-generator.js").Generator) => void} applyStyles - Apply generated styles to the document (live-only)
|
|
85
70
|
* @property {(shadowRoot: ShadowRoot, layers?: string[], additionalSheets?: CSSStyleSheet[]) => Promise<void>} adoptLayers - Adopt multiple layers into a ShadowRoot. May log errors and fallback to additionalSheets when static imports fail.
|
|
86
71
|
* @property {(shadowRoot: ShadowRoot, additionalSheets?: CSSStyleSheet[]) => Promise<void>} adoptPrimitives - Adopt primitives layer into a ShadowRoot. Designed as a convenience for components.
|
|
87
72
|
* @property {(css:string) => CSSStyleSheet} createStylesheet - Create a constructable stylesheet from CSS text. @throws {DOMException} on invalid CSS in some browsers.
|
|
88
73
|
* @property {() => boolean} isLiveMode - Returns true when running in live/designer-backed mode
|
|
89
74
|
* @property {() => Promise<typeof import("./pds-core/pds-generator.js").Generator>} getGenerator - Live-only accessor for the Generator class
|
|
90
|
-
* @property {(question: string) => Promise<any[]>} query - Live-only query interface
|
|
91
|
-
* @property {(message: string, options?: any) => Promise<any>} ask - Modal dialog helper (static + live)
|
|
92
|
-
* @property {(message: string, options?: any) => Promise<string>} toast - Toast helper (static + live)
|
|
93
|
-
* @property {Record<string, any>} common - Common utilities namespace (static + live)
|
|
94
|
-
* @property {(html: string) => Element[]} parse - HTML string parser (static + live)
|
|
95
|
-
* @property {any} AutoComplete - Lazy-loaded autocomplete class (null until loaded)
|
|
96
|
-
* @property {() => Promise<any>} loadAutoComplete - Lazy-load the autocomplete package
|
|
97
|
-
* @property {Record<string, any>} enums - Enum values (static + live)
|
|
98
|
-
* @property {any} ontology - Design system ontology (live-only)
|
|
99
|
-
* @property {Record<string, any>} presets - Preset metadata (live-only)
|
|
100
|
-
* @property {Array<{selector: string, description?: string, demoHtml?: string}>} enhancerMetadata - Enhancer metadata (live-only)
|
|
101
|
-
* @property {Array<any>} defaultEnhancers - Default enhancer definitions (static + live)
|
|
102
|
-
* @property {(el: Element) => ComponentDef | null} findComponentForElement - Ontology lookup helper (live-only)
|
|
103
|
-
* @property {() => void} preloadCritical - Emit critical CSS into <style> (live-only)
|
|
104
|
-
* @property {any} currentConfig - Frozen configuration snapshot after start (static + live)
|
|
105
|
-
* @property {any} compiled - Compiled design system state (live-only)
|
|
106
|
-
* @property {string|null} theme - Theme preference getter/setter (static + live, browser only)
|
|
107
|
-
* @property {(config?: object) => Promise<any>} start - Unified entry point for live/static init
|
|
108
75
|
*/
|
|
109
76
|
/**
|
|
110
77
|
* Workspace for the Pure Design System runtime API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../src/js/pds.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../src/js/pds.js"],"names":[],"mappings":"AAkMA,mDAsBC;AAGD,4DAuCC;;;;;;;;;;;;;;;;;;;;;;;;;cA3Oa,OAAO,4BAA4B,EAAE,WAAW;;;;iBAChD,CAAC,SAAS,CAAC,EAAE,OAAO,6BAA6B,EAAE,SAAS,KAAK,IAAI;;;;iBACrE,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,gBAAgB,CAAC,EAAE,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;;;;qBAChG,CAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,CAAC,EAAE,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;;;;sBAC7E,CAAC,GAAG,EAAC,MAAM,KAAK,aAAa;;AAW3C,+BAA+B;AAC/B,kBADW,MAAM,GAAG,OAAO,CACD;AArC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;GAIG;AACH;CAAoC"}
|
package/package.json
CHANGED
|
@@ -1,85 +1,76 @@
|
|
|
1
|
-
const esbuild = require("esbuild");
|
|
2
|
-
const http = require("http");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
res.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
await ctx.watch();
|
|
78
|
-
const { host, port } = await ctx.serve({ servedir: "public", port: 4173 });
|
|
79
|
-
console.log("Dev server running at http://" + host + ":" + port);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
start().catch((err) => {
|
|
83
|
-
console.error(err);
|
|
84
|
-
process.exit(1);
|
|
85
|
-
});
|
|
1
|
+
const esbuild = require("esbuild");
|
|
2
|
+
const http = require("http");
|
|
3
|
+
|
|
4
|
+
const reloadPort = 4174;
|
|
5
|
+
const reloadClients = new Set();
|
|
6
|
+
|
|
7
|
+
function startReloadServer() {
|
|
8
|
+
const server = http.createServer((req, res) => {
|
|
9
|
+
if (req.url !== "/events") {
|
|
10
|
+
res.writeHead(404);
|
|
11
|
+
res.end();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
res.writeHead(200, {
|
|
16
|
+
"Content-Type": "text/event-stream",
|
|
17
|
+
"Cache-Control": "no-cache",
|
|
18
|
+
Connection: "keep-alive",
|
|
19
|
+
"Access-Control-Allow-Origin": "*",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
res.write("retry: 1000\n\n");
|
|
23
|
+
reloadClients.add(res);
|
|
24
|
+
|
|
25
|
+
req.on("close", () => {
|
|
26
|
+
reloadClients.delete(res);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
server.listen(reloadPort, () => {
|
|
31
|
+
console.log("Live reload listening on http://localhost:" + reloadPort + "/events");
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function notifyReload() {
|
|
36
|
+
for (const client of reloadClients) {
|
|
37
|
+
client.write("data: reload\n\n");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function liveReloadPlugin() {
|
|
42
|
+
return {
|
|
43
|
+
name: "live-reload",
|
|
44
|
+
setup(build) {
|
|
45
|
+
build.onEnd((result) => {
|
|
46
|
+
if (!result.errors.length) {
|
|
47
|
+
notifyReload();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function start() {
|
|
55
|
+
startReloadServer();
|
|
56
|
+
const ctx = await esbuild.context({
|
|
57
|
+
entryPoints: ["src/js/app.js"],
|
|
58
|
+
outdir: "public/assets/js",
|
|
59
|
+
bundle: true,
|
|
60
|
+
format: "esm",
|
|
61
|
+
sourcemap: true,
|
|
62
|
+
publicPath: "/assets/js",
|
|
63
|
+
external: ["/assets/my/*"],
|
|
64
|
+
logLevel: "info",
|
|
65
|
+
plugins: [liveReloadPlugin()],
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
await ctx.watch();
|
|
69
|
+
const { host, port } = await ctx.serve({ servedir: "public", port: 4173 });
|
|
70
|
+
console.log("Dev server running at http://" + host + ":" + port);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
start().catch((err) => {
|
|
74
|
+
console.error(err);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
});
|
|
@@ -1,80 +1,69 @@
|
|
|
1
|
-
import esbuild from "esbuild";
|
|
2
|
-
import http from "http";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
format: "esm",
|
|
72
|
-
sourcemap: true,
|
|
73
|
-
publicPath: "/assets/js",
|
|
74
|
-
external: ["/assets/my/*"],
|
|
75
|
-
logLevel: "info",
|
|
76
|
-
plugins: [liveReloadPlugin()],
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
await ctx.watch();
|
|
80
|
-
const { host, port } = await ctx.serve({ servedir: "public", port: 4173 });
|
|
1
|
+
import esbuild from "esbuild";
|
|
2
|
+
import http from "http";
|
|
3
|
+
|
|
4
|
+
const reloadPort = 4174;
|
|
5
|
+
const reloadClients = new Set();
|
|
6
|
+
|
|
7
|
+
function startReloadServer() {
|
|
8
|
+
const server = http.createServer((req, res) => {
|
|
9
|
+
if (req.url !== "/events") {
|
|
10
|
+
res.writeHead(404);
|
|
11
|
+
res.end();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
res.writeHead(200, {
|
|
16
|
+
"Content-Type": "text/event-stream",
|
|
17
|
+
"Cache-Control": "no-cache",
|
|
18
|
+
Connection: "keep-alive",
|
|
19
|
+
"Access-Control-Allow-Origin": "*",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
res.write("retry: 1000\n\n");
|
|
23
|
+
reloadClients.add(res);
|
|
24
|
+
|
|
25
|
+
req.on("close", () => {
|
|
26
|
+
reloadClients.delete(res);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
server.listen(reloadPort, () => {
|
|
31
|
+
console.log("Live reload listening on http://localhost:" + reloadPort + "/events");
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function notifyReload() {
|
|
36
|
+
for (const client of reloadClients) {
|
|
37
|
+
client.write("data: reload\n\n");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function liveReloadPlugin() {
|
|
42
|
+
return {
|
|
43
|
+
name: "live-reload",
|
|
44
|
+
setup(build) {
|
|
45
|
+
build.onEnd((result) => {
|
|
46
|
+
if (!result.errors.length) {
|
|
47
|
+
notifyReload();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
startReloadServer();
|
|
55
|
+
|
|
56
|
+
const ctx = await esbuild.context({
|
|
57
|
+
entryPoints: ["src/js/app.js"],
|
|
58
|
+
outdir: "public/assets/js",
|
|
59
|
+
bundle: true,
|
|
60
|
+
format: "esm",
|
|
61
|
+
sourcemap: true,
|
|
62
|
+
publicPath: "/assets/js",
|
|
63
|
+
external: ["/assets/my/*"],
|
|
64
|
+
logLevel: "info",
|
|
65
|
+
plugins: [liveReloadPlugin()],
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
await ctx.watch();
|
|
69
|
+
const { host, port } = await ctx.serve({ servedir: "public", port: 4173 });
|