This repository was archived by the owner on Apr 11, 2025. It is now read-only.
forked from alertifyjs/alertify.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrollup.config.js
More file actions
59 lines (56 loc) · 1.48 KB
/
rollup.config.js
File metadata and controls
59 lines (56 loc) · 1.48 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import nodeResolve from "@rollup/plugin-node-resolve";
import commonJs from "@rollup/plugin-commonjs";
import postcss from "rollup-plugin-postcss";
import autoprefixer from "autoprefixer";
import terser from "@rollup/plugin-terser";
import typescript from "@rollup/plugin-typescript";
const isSourceMap = false;
function getPlugins(config) {
return [
nodeResolve(),
commonJs(),
typescript({
"target": config.target,
"module": "ES2015",
"declaration": config.target === "esnext"
}),
postcss({
minimize: { safe: true },
inject: false,
sourceMap: isSourceMap,
plugins: [autoprefixer()]
}),
terser({
parse: {
// parse options
},
compress: {
// compress options
},
mangle: {
// mangle options
},
output: {
// output options
max_line_len: 500
}
})
];
}
export default [
{
input: "src/ts/alertify.ts",
output: [{
file: "dist/js/alertify.js",
format: "umd",
sourcemap: isSourceMap,
name: "alertifyjs"
},{
file: "docs/js/alertify.js",
format: "umd",
sourcemap: isSourceMap,
name: "alertifyjs"
}],
plugins: getPlugins({ target: "es5" })
}
];