mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-08 07:50:44 -05:00
23 lines
541 B
JavaScript
23 lines
541 B
JavaScript
import esbuild from 'esbuild';
|
|
import { copy } from 'fs-extra';
|
|
|
|
const source = 'libs/plugins-styles';
|
|
const dist = 'dist/plugins-styles';
|
|
|
|
const handleErr = (err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
};
|
|
|
|
esbuild.build({
|
|
entryPoints: [`${source}/src/lib/styles.css`],
|
|
bundle: true,
|
|
outfile: `${dist}/styles.css`,
|
|
minify: true,
|
|
loader: {
|
|
'.svg': 'text'
|
|
}
|
|
}).catch(handleErr);
|
|
|
|
copy(`${source}/package.json`, `${dist}/package.json`).catch(handleErr);
|
|
copy(`${source}/README.md`, `${dist}/README.md`).catch(handleErr);
|