-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
41 lines (38 loc) · 1.08 KB
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import typescript from "rollup-plugin-typescript2";
import uglify from "rollup-plugin-uglify-es";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import pkg from "./package.json";
const plugins = [
typescript(),
resolve({ jsnext: true }),
commonjs(),
uglify({
output: {
comments: true,
},
}),
];
const compiled = (new Date()).toUTCString().replace(/GMT/g, "UTC");
const banner = `/*!
* ${pkg.name} - v${pkg.version}
* https://github.com/bigtimebuddy/pixi-graphics-format
* Compiled ${compiled}
*
* ${pkg.name} is licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license
*/`;
/**
* This configuration is designed for building the browser version
* of the library, ideally included using the <script> element
*/
export default {
entry: "src/index.ts",
sourceMap: true,
moduleName: "__pixiGraphics",
intro: 'if (typeof PIXI === "undefined") { throw "PixiJS required"; }',
banner,
dest: `dist/pixi-graphics-format.js`,
format: "umd",
plugins,
};