mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
* fix(data-table): type DataTableRowId as "any" #530 Fixes #530 * fix(tree-view): make first node focusable if activeId does not match selected * fix(overflow-menu): set type="button" to prevent default submit behavior #554 Fixes #554 * fix(overflow-menu): update semantic attributes in OverflowMenuItem * fix(number-input): do not dispatch change event on initialization #561 Fixes #561 * fix(tree-view): make first focusable node tabbable regardless of active/selected states * fix(date-picker): load rangePlugin dynamically * build(rollup): enable inlineDynamicImports * build(rollup): remove "clipboard-copy" global * fix(overflow-menu): do not render title if using a slot #537 Fixes #537 * fix(select): forward missing focus, input events #501 Fixes #501
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
import { terser } from "rollup-plugin-terser";
|
|
import pkg from "./package.json";
|
|
import resolve from "@rollup/plugin-node-resolve";
|
|
import commonjs from "@rollup/plugin-commonjs";
|
|
import svelte from "rollup-plugin-svelte";
|
|
import sveld from "sveld";
|
|
|
|
export default ["es", "umd"].map((format) => {
|
|
const UMD = format === "umd";
|
|
|
|
return {
|
|
input: "src",
|
|
inlineDynamicImports: true,
|
|
output: {
|
|
format,
|
|
file: UMD ? pkg.main : pkg.module,
|
|
name: UMD ? "carbon-components-svelte" : undefined,
|
|
globals: { flatpickr: "flatpickr" },
|
|
},
|
|
external: Object.keys(pkg.dependencies),
|
|
plugins: [
|
|
svelte({ emitCss: false }),
|
|
resolve(),
|
|
commonjs(),
|
|
UMD && terser(),
|
|
UMD &&
|
|
sveld({
|
|
glob: true,
|
|
markdown: true,
|
|
markdownOptions: {
|
|
onAppend: (type, document, components) => {
|
|
if (type === "h1")
|
|
document.append(
|
|
"quote",
|
|
`${components.size} components exported from ${pkg.name}@${pkg.version}.`
|
|
);
|
|
},
|
|
},
|
|
json: true,
|
|
jsonOptions: {
|
|
outFile: "docs/src/COMPONENT_API.json",
|
|
},
|
|
}),
|
|
],
|
|
};
|
|
});
|