Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
83 additions
and 1 deletion.
- +21 −0 custom.js
- +2 −1 package.json
- +52 −0 rollup-custom.config.js
- +8 −0 yarn.lock
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,21 @@ | ||
export { version } from "./dist/package.js"; | ||
|
||
export { select, selectAll } from "d3-selection"; | ||
|
||
export * from "d3-selection-multi"; | ||
export { transition } from "d3-transition"; | ||
|
||
export { | ||
easeElasticOut, | ||
easeSinOut, | ||
easeBackOut, | ||
easeLinear, | ||
easeCubicOut, | ||
easeExpOut | ||
} from "d3-ease"; | ||
|
||
export { arc, pie } from "d3-shape"; | ||
|
||
export { entries } from "d3-collection"; | ||
|
||
export { interpolate, interpolateNumber } from "d3-interpolate"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,52 @@ | ||
import ascii from "rollup-plugin-ascii"; | ||
import node from "rollup-plugin-node-resolve"; | ||
import { terser } from "rollup-plugin-terser"; | ||
import * as meta from "./package.json"; | ||
|
||
const copyright = `// ${meta.homepage} v${ | ||
meta.version | ||
} Copyright ${new Date().getFullYear()} ${meta.author.name}`; | ||
|
||
function onwarn(message, warn) { | ||
if (message.code === "CIRCULAR_DEPENDENCY") return; | ||
warn(message); | ||
} | ||
|
||
export default [ | ||
{ | ||
input: "index.js", | ||
external: Object.keys(meta.dependencies || {}).filter(key => | ||
/^d3-/.test(key) | ||
), | ||
output: { | ||
file: "dist/d3-custom.node.js", | ||
format: "cjs" | ||
}, | ||
onwarn | ||
}, | ||
{ | ||
input: "custom.js", | ||
plugins: [node(), ascii()], | ||
output: { | ||
extend: true, | ||
banner: copyright, | ||
file: "dist/d3-custom.js", | ||
format: "umd", | ||
indent: false, | ||
name: "d3" | ||
}, | ||
onwarn | ||
}, | ||
{ | ||
input: "custom.js", | ||
plugins: [node(), ascii(), terser({ output: { preamble: copyright } })], | ||
output: { | ||
extend: true, | ||
file: "dist/d3-custom.min.js", | ||
format: "umd", | ||
indent: false, | ||
name: "d3" | ||
}, | ||
onwarn | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters