1 Star 0 Fork 1

周红伟/chroma.js

forked from Hankin/chroma.js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
Gregor Aisch 提交于 2022-01-27 16:51 . chore: update dev dependencies
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import buble from "@rollup/plugin-buble";
import license from "rollup-plugin-license";
import replace from "@rollup/plugin-replace";
import path from "path";
import { terser } from "rollup-plugin-terser";
const minify = !process.env.ROLLUP_WATCH && !process.env.DEV;
/** globals process, __dirname **/
module.exports = [
bundle("index.js", "chroma"),
bundle("index-light.js", "chroma-light"),
];
function bundle(input, target) {
return {
input,
output: {
file: `${target}${minify ? ".min" : ""}.js`,
format: "umd",
name: "chroma",
},
plugins: [
resolve(),
commonjs(),
replace({
delimiters: ["@@", ""],
preventAssignment: true,
version: require("./package.json").version,
}),
// If we're building for production (npm run build
// instead of npm run dev), transpile and minify
buble({
transforms: { dangerousForOf: true },
}),
minify &&
terser({
mangle: true,
}),
license({
sourcemap: true,
//cwd: '.', // Default is process.cwd()
banner: {
content: {
file: path.join(__dirname, "LICENSE"),
},
},
}),
],
};
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/zhou-hw/chroma.js.git
git@gitee.com:zhou-hw/chroma.js.git
zhou-hw
chroma.js
chroma.js
main

搜索帮助