2024-03-27 07:57:02 -05:00
|
|
|
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: {
|
2024-08-13 06:57:35 -05:00
|
|
|
'.svg': 'dataurl'
|
2024-03-27 07:57:02 -05:00
|
|
|
}
|
|
|
|
}).catch(handleErr);
|
|
|
|
|
|
|
|
copy(`${source}/package.json`, `${dist}/package.json`).catch(handleErr);
|
|
|
|
copy(`${source}/README.md`, `${dist}/README.md`).catch(handleErr);
|
2024-06-10 07:44:14 -05:00
|
|
|
copy(`LICENSE`, `${dist}/LICENSE`).catch(handleErr);
|