mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
feat: Add n8n-node CLI with commands to scaffold and develop nodes (#18090)
This commit is contained in:
17
packages/@n8n/node-cli/scripts/copy-templates.mjs
Executable file
17
packages/@n8n/node-cli/scripts/copy-templates.mjs
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import glob from 'fast-glob';
|
||||
import { cp } from 'node:fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
const templateFiles = glob.sync(['src/template/templates/**/*'], {
|
||||
cwd: path.resolve(import.meta.dirname, '..'),
|
||||
ignore: ['**/node_modules', '**/dist'],
|
||||
dot: true,
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
templateFiles.map((template) =>
|
||||
cp(template, `dist/${template.replace('src/', '')}`, { recursive: true }),
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user