n8n/packages/core/bin/copy-icons
कारतोफ्फेलस्क्रिप्ट™ cf441e0294
ci: Remove gulp (no-changelog) (#9283)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2024-05-06 18:42:03 +02:00

20 lines
444 B
JavaScript
Executable file

#!/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 });
}),
),
);
})();