1 Star 0 Fork 0

麻本法 / d3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.js 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
Mike Bostock 提交于 2019-11-20 07:34 . Squelch Rollup warnings.
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.node.js",
format: "cjs"
},
onwarn
},
{
input: "index.js",
plugins: [
node(),
ascii()
],
output: {
extend: true,
banner: copyright,
file: "dist/d3.js",
format: "umd",
indent: false,
name: "d3"
},
onwarn
},
{
input: "index.js",
plugins: [
node(),
ascii(),
terser({output: {preamble: copyright}})
],
output: {
extend: true,
file: "dist/d3.min.js",
format: "umd",
indent: false,
name: "d3"
},
onwarn
}
];
JavaScript
1
https://gitee.com/zinface/d3.git
git@gitee.com:zinface/d3.git
zinface
d3
d3
master

搜索帮助