2019-12-26 03:57:27 +01:00
|
|
|
import { terser } from "rollup-plugin-terser";
|
2018-08-01 15:52:32 +02:00
|
|
|
import typescript from "rollup-plugin-typescript2";
|
2019-12-26 03:57:27 +01:00
|
|
|
import resolve from "@rollup/plugin-node-resolve";
|
2018-08-01 15:52:32 +02:00
|
|
|
import license from "rollup-plugin-license";
|
|
|
|
|
2019-12-31 18:33:24 +01:00
|
|
|
const umd = {
|
|
|
|
format: "umd",
|
|
|
|
name: "skinview3d",
|
|
|
|
indent: "\t",
|
|
|
|
globals: {
|
|
|
|
"three": "THREE"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const licensePlugin = license({
|
|
|
|
banner: `
|
2020-01-01 09:46:54 +01:00
|
|
|
skinview3d (https://github.com/bs-community/skinview3d)
|
|
|
|
|
|
|
|
MIT License
|
|
|
|
`
|
2019-12-31 18:33:24 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
const base = {
|
|
|
|
input: "src/skinview3d.ts",
|
|
|
|
external: [
|
|
|
|
"three"
|
2018-08-01 15:52:32 +02:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
export default [
|
2019-12-31 18:33:24 +01:00
|
|
|
{
|
|
|
|
...base,
|
2020-01-22 17:33:57 +01:00
|
|
|
output: { ...umd, file: "dist/skinview3d.js" },
|
2019-12-31 18:33:24 +01:00
|
|
|
plugins: [
|
|
|
|
resolve(),
|
|
|
|
typescript(),
|
|
|
|
licensePlugin
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
...base,
|
|
|
|
output: { ...umd, file: "dist/skinview3d.min.js" },
|
|
|
|
plugins: [
|
|
|
|
resolve(),
|
|
|
|
typescript(),
|
|
|
|
terser(),
|
|
|
|
licensePlugin
|
|
|
|
]
|
|
|
|
}
|
2018-08-01 15:52:32 +02:00
|
|
|
];
|