catppuccin-palette/esbuild.js
winston e92b4a9312
feat: npm package: hybrid cjs+esm support (#14)
* feat(npm): add build script for hybrid cjs+esm support
* style: fix mixed indents
* allow import from CSS
* doc: instructions on how to import css file
* refactor(npm):  use esbuild.js for a single build command
* chore: fix mixed indents
* fix(npm): rename file extension in npm include list

Co-authored-by: sakkke <w32w64@gmail.com>
Co-authored-by: Pocco81 <58336662+Pocco81@users.noreply.github.com>
Co-authored-by: Pocco81 <pocco451@gmail.com>
2022-06-13 06:48:36 +00:00

16 lines
342 B
JavaScript

const esbuild = require('esbuild');
const buildCJS = esbuild.build({
entryPoints: ['./index.js'],
outfile: './dist/index.cjs',
format: 'cjs'
})
const buildESM = esbuild.build({
entryPoints: ['./index.js'],
outfile: './dist/index.mjs',
format: 'esm'
})
Promise.all([buildCJS, buildESM]).catch(() => process.exit(1))