From dfcb98bfbef5a06438fa6fe98e0b02fccd7b9b65 Mon Sep 17 00:00:00 2001 From: Jan Andrle Date: Wed, 13 Sep 2023 21:06:13 +0200 Subject: [PATCH] :truck: --- src/jsdom.d.ts => jsdom.d.ts | 4 ++-- src/jsdom.js => jsdom.js | 6 +++--- package.json | 23 ++++++++--------------- src/signals.d.ts => signals.d.ts | 0 signals.js | 4 ++++ src/signals.js | 4 ---- 6 files changed, 17 insertions(+), 24 deletions(-) rename src/jsdom.d.ts => jsdom.d.ts (61%) rename src/jsdom.js => jsdom.js (88%) rename src/signals.d.ts => signals.d.ts (100%) create mode 100644 signals.js delete mode 100644 src/signals.js diff --git a/src/jsdom.d.ts b/jsdom.d.ts similarity index 61% rename from src/jsdom.d.ts rename to jsdom.d.ts index d4fb3a7..9d4981d 100644 --- a/src/jsdom.d.ts +++ b/jsdom.d.ts @@ -1,5 +1,5 @@ -import { el, assign, on } from "../index.d"; -export * from "../index.d"; +import { el, assign, on } from "./index.d"; +export * from "./index.d"; export function register(dom: typeof document): Promise<{ el: typeof el, assign: typeof assign, diff --git a/src/jsdom.js b/jsdom.js similarity index 88% rename from src/jsdom.js rename to jsdom.js index fc04d02..7c159fe 100644 --- a/src/jsdom.js +++ b/jsdom.js @@ -1,4 +1,4 @@ -import { prop_process } from './dom-common.js'; +import { prop_process } from './src/dom-common.js'; const { setDelete }= prop_process; /** @param {HTMLElement} obj */ prop_process.setDelete= function(obj, prop, value){ @@ -13,7 +13,7 @@ export let assign; export let on; export async function register(dom, keys_aditional= []){ if(dom_last===dom) - return import("../index.js"); + return import("./index.js"); keys.push(...keys_aditional); const w= dom.window; @@ -21,7 +21,7 @@ export async function register(dom, keys_aditional= []){ globalThis.window= w; w.console= globalThis.console; - const m= await import("../index.js"); + const m= await import("./index.js"); el= m.el; assign= m.assign; on= m.on; diff --git a/package.json b/package.json index 3866a08..6920447 100644 --- a/package.json +++ b/package.json @@ -16,17 +16,13 @@ "types": "./index.d.ts", "type": "module", "exports": { - ".": { - "import": "./index.js", - "types": "./index.d.ts" - }, "./jsdom": { - "import": "./src/jsdom.js", - "types": "./src/jsdom.d.ts" + "import": "./jsdom.js", + "types": "./jsdom.d.ts" }, "./signals": { - "import": "./src/signals.js", - "types": "./src/signals.d.ts" + "import": "./signals.js", + "types": "./signals.d.ts" }, "./signals-lib": { "import": "./src/signals-lib.js", @@ -35,14 +31,11 @@ }, "typesVersions": { "*": { - ".": [ - "./index.d.ts" - ], "./jsdom": [ - "./src/jsdom.d.ts" + "./jsdom.d.ts" ], "./signals": [ - "./src/signals.d.ts" + "./signals.d.ts" ], "./signals-lib": [ "./src/signals.d.ts" @@ -50,8 +43,8 @@ } }, "files": [ - "index.js", - "index.d.ts", + "*.js", + "*.d.ts", "src" ], "engines": { diff --git a/src/signals.d.ts b/signals.d.ts similarity index 100% rename from src/signals.d.ts rename to signals.d.ts diff --git a/signals.js b/signals.js new file mode 100644 index 0000000..4ea6575 --- /dev/null +++ b/signals.js @@ -0,0 +1,4 @@ +export { S, isSignal } from "src/signals-lib.js"; +import { signals_config } from "src/signals-lib.js"; +import { registerReactivity } from "src/signals-common.js"; +registerReactivity(signals_config); diff --git a/src/signals.js b/src/signals.js deleted file mode 100644 index 21ea953..0000000 --- a/src/signals.js +++ /dev/null @@ -1,4 +0,0 @@ -export { S, isSignal } from "./signals-lib.js"; -import { signals_config } from "./signals-lib.js"; -import { registerReactivity } from "./signals-common.js"; -registerReactivity(signals_config);