release: WRNexusJS 0.3.5

This commit is contained in:
2026-07-24 12:46:44 +05:30
parent 44ba847210
commit c81dedff17
2114 changed files with 65790 additions and 150559 deletions
+14 -2
View File
@@ -53,9 +53,21 @@ const components = readdirSync(componentsDir)
const slots = [...source.matchAll(/<slot(?:\s+name="([^"]+)")?/g)].map(
(match) => match[1] ?? "default",
);
const events = [
...new Set([...source.matchAll(/@([A-Za-z][A-Za-z0-9_-]*)=/g)].map((match) => match[1])),
const declaredEvents = [
...new Set(
[...source.matchAll(/@event\s+([A-Za-z][A-Za-z0-9_]*)\s*=\s*function/g)].map(
(match) => match[1],
),
),
];
const events =
declaredEvents.length > 0
? declaredEvents
: (entry?.events ?? [
...new Set(
[...source.matchAll(/@([A-Za-z][A-Za-z0-9_-]*)=/g)].map((match) => match[1]),
),
]);
return {
name,
mount: name,