UNPKG

poline

Version:

color palette generator mico-lib

155 lines (141 loc) 2.95 kB
import { build } from "esbuild"; // Bundled CJS build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, format: "cjs", outfile: "dist/index.cjs", }); // Bundled CJS, minified build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, minify: true, format: "cjs", outfile: "dist/index.min.cjs", }); // Bundled ESM build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, format: "esm", target: "es2020", outfile: "dist/index.mjs", }); // Bundled ESM, minified build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, minify: true, format: "esm", target: "es2020", outfile: "dist/index.min.mjs", }); // Bundled IIFE build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, format: "iife", target: "node14", globalName: "poline", outfile: "dist/index.js", }); // Bundled IIFE, minified build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, minify: true, format: "iife", target: "es6", globalName: "poline", outfile: "dist/index.min.js", }); // Bundled UMD // Adapted from: https://github.com/umdjs/umd/blob/master/templates/returnExports.js build({ entryPoints: ["./src/index.ts"], logLevel: "info", bundle: true, format: "iife", target: "es6", globalName: "poline", banner: { js: `(function(root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); } else if (typeof module === 'object' && module.exports) { module.exports = factory(); } else { root.poline = factory(); } } (typeof self !== 'undefined' ? self : this, function() {`, }, footer: { js: `return poline; }));`, }, outfile: "dist/index.umd.js", }); // Bundled CJS build({ entryPoints: ["./src/webcomponent.ts"], logLevel: "info", bundle: true, format: "cjs", outfile: "dist/picker.cjs", }); // Bundled CJS, minified build({ entryPoints: ["./src/webcomponent.ts"], logLevel: "info", bundle: true, minify: true, format: "cjs", outfile: "dist/picker.min.cjs", }); // Bundled ESM build({ entryPoints: ["./src/webcomponent.ts"], logLevel: "info", bundle: true, format: "esm", target: "es2020", outfile: "dist/picker.mjs", }); // Bundled ESM, minified build({ entryPoints: ["./src/webcomponent.ts"], logLevel: "info", bundle: true, minify: true, format: "esm", target: "es2020", outfile: "dist/picker.min.mjs", }); // Bundled IIFE build({ entryPoints: ["./src/webcomponent.ts"], logLevel: "info", bundle: true, format: "iife", target: "node14", globalName: "polinePicker", outfile: "dist/picker.js", }); // Bundled IIFE, minified build({ entryPoints: ["./src/webcomponent.ts"], logLevel: "info", bundle: true, minify: true, format: "iife", target: "es6", globalName: "polinePicker", outfile: "dist/picker.min.js", });