Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório api-n8n-node, anteriormente
0
api-n8n-node/scripts/copy-assets.mjs
2026-11-27 22:29:25 +02:00

18 linhas
610 B
JavaScript

// Generated from the OpenAPI specification. Do not edit by hand: regenerate.
// Copies the icons and the .node.json files to dist/, without extra packages.
import { cpSync, mkdirSync, readdirSync, statSync } from "node:fs";
import { join, dirname } from "node:path";
function walk(dir) {
for (const name of readdirSync(dir)) {
const p = join(dir, name);
if (statSync(p).isDirectory()) walk(p);
else if (/\.(svg|png|json)$/.test(name)) {
const out = join("dist", p);
mkdirSync(dirname(out), { recursive: true });
cpSync(p, out);
}
}
}
walk("nodes");
walk("credentials");