release: WRNexusJS 0.4.0

This commit is contained in:
2026-07-27 12:42:18 +05:30
parent 8b728a3e5d
commit 30e5721e84
250 changed files with 10065 additions and 3923 deletions
+10 -5
View File
@@ -6,7 +6,7 @@
import { copyFileSync, existsSync, mkdirSync } from "node:fs";
import { join, resolve } from "node:path";
import { uiComponentsDir, uiComponentNames } from "@wrnexus/ui";
import { uiComponentNames, uiComponentPath } from "@wrnexus/ui";
export function runEject(appRoot: string, names: string[]): void {
const root = resolve(appRoot);
@@ -20,12 +20,17 @@ export function runEject(appRoot: string, names: string[]): void {
}
mkdirSync(dest, { recursive: true });
for (const name of names) {
if (!available.includes(name)) {
console.error(`✗ Unknown component "${name}". Available: ${available.join(", ")}`);
for (const requestedName of names) {
const name = available.find(
(componentName) => componentName.toLowerCase() === requestedName.toLowerCase(),
);
if (!name) {
console.error(`✗ Unknown component "${requestedName}". Available: ${available.join(", ")}`);
continue;
}
const src = join(uiComponentsDir(), `${name}.wrn`);
const src = uiComponentPath(name);
const out = join(dest, `${name}.wrn`);
if (existsSync(out)) {
console.error(`${name}: app/components/${name}.wrn already exists — skipped`);