mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 00:54:06 -08:00
20 lines
444 B
Plaintext
20 lines
444 B
Plaintext
|
#!/usr/bin/env node
|
||
|
|
||
|
const glob = require('fast-glob');
|
||
|
const pLimit = require('p-limit');
|
||
|
const { cp } = require('fs/promises');
|
||
|
const { packageDir } = require('./common');
|
||
|
|
||
|
const limiter = pLimit(20);
|
||
|
const icons = glob.sync('{nodes,credentials}/**/*.{png,svg}', { cwd: packageDir });
|
||
|
|
||
|
(async () => {
|
||
|
await Promise.all(
|
||
|
icons.map((icon) =>
|
||
|
limiter(() => {
|
||
|
return cp(icon, `dist/${icon}`, { recursive: true });
|
||
|
}),
|
||
|
),
|
||
|
);
|
||
|
})();
|