Skip to content

Commit f83228c

Browse files
fix differences
1 parent 27287c5 commit f83228c

File tree

6 files changed

+68
-63
lines changed

6 files changed

+68
-63
lines changed

rollup-es5.config.dev.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ export default [{
5454
input: "lib/z-worker-inline-template-base64.js",
5555
output: [{
5656
file: "lib/z-worker-inline.js",
57-
format: "esm"
58-
}],
59-
plugins: [replace({
60-
preventAssignment: true,
61-
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
62-
})]
57+
format: "esm",
58+
plugins: [
59+
replace({
60+
preventAssignment: true,
61+
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
62+
})]
63+
}]
6364
}, {
6465
input: ["lib/zip.js"],
6566
output: [{

rollup-es5.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ export default [{
5656
input: "lib/z-worker-inline-template-base64.js",
5757
output: [{
5858
file: "lib/z-worker-inline.js",
59-
format: "esm"
60-
}],
61-
plugins: [
62-
replace({
63-
preventAssignment: true,
64-
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
65-
}),
66-
terser()
67-
]
59+
format: "esm",
60+
plugins: [
61+
replace({
62+
preventAssignment: true,
63+
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
64+
}),
65+
terser()
66+
]
67+
}]
6868
}, {
6969
input: ["lib/zip.js"],
7070
output: [{

rollup-fflate.config.dev.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default [{
44
input: "lib/z-worker-fflate.js",
55
output: [{
66
file: "lib/z-worker-inline.js",
7-
format: "es"
7+
format: "umd"
88
}],
99
plugins: [nodeResolve()]
1010
}, {
@@ -19,7 +19,7 @@ export default [{
1919
file: "lib/z-worker-inline.js",
2020
outro:
2121
` \`;
22-
const uri = URL.createObjectURL(new Blob(["(" + code + ")()"], { type : "text/javascript" }));
22+
const uri = URL.createObjectURL(new Blob([code], { type : "text/javascript" }));
2323
configure({ workerScripts: { inflate: [uri], deflate: [uri] } });
2424
}
2525
};`,
@@ -35,7 +35,8 @@ export default [{
3535
file: "dist/zip.js",
3636
format: "umd",
3737
name: "zip"
38-
}]
38+
}],
39+
plugins: [nodeResolve()]
3940
}, {
4041
input: ["lib/zip-full-fflate.js"],
4142
output: [{
@@ -82,15 +83,16 @@ export default [{
8283
file: "dist/zip-fs.js",
8384
format: "umd",
8485
name: "zip"
85-
}]
86+
}],
87+
plugins: [nodeResolve()]
8688
}, {
8789
input: "index-fflate.js",
8890
output: [{
89-
file: "dist/zip-fs-full.js",
91+
file: "dist/zip-fs-full.min.js",
9092
format: "umd",
9193
name: "zip"
9294
}, {
93-
file: "dist/zip-fs-full.min.js",
95+
file: "dist/zip-fs-full.js",
9496
format: "umd",
9597
name: "zip"
9698
}],
@@ -100,5 +102,6 @@ export default [{
100102
output: [{
101103
file: "dist/z-worker.js",
102104
format: "iife"
103-
}]
105+
}],
106+
plugins: [nodeResolve()]
104107
}];

rollup-fflate.config.js

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ export default [{
55
input: "lib/z-worker-fflate.js",
66
output: [{
77
file: "lib/z-worker-inline.js",
8-
format: "es"
8+
format: "es",
9+
plugins: [terser()]
910
}],
10-
plugins: [nodeResolve(), terser()]
11+
plugins: [nodeResolve()]
1112
}, {
1213
input: "lib/z-worker-inline.js",
1314
output: [{
@@ -24,9 +25,9 @@ export default [{
2425
configure({ workerScripts: { inflate: [uri], deflate: [uri] } });
2526
}
2627
};`,
27-
format: "esm"
28-
}],
29-
plugins: [terser()]
28+
format: "esm",
29+
plugins: [terser()]
30+
}]
3031
}, {
3132
input: ["lib/zip.js"],
3233
output: [{
@@ -37,9 +38,9 @@ export default [{
3738
}, {
3839
file: "dist/zip.js",
3940
format: "umd",
40-
name: "zip",
41-
plugins: []
42-
}]
41+
name: "zip"
42+
}],
43+
plugins: [nodeResolve()]
4344
}, {
4445
input: ["lib/zip-full-fflate.js"],
4546
output: [{
@@ -50,34 +51,36 @@ export default [{
5051
}, {
5152
file: "dist/zip-full.js",
5253
format: "umd",
53-
name: "zip",
54-
plugins: []
54+
name: "zip"
5555
}],
5656
plugins: [nodeResolve()]
5757
}, {
5858
input: "lib/zip-no-worker-fflate.js",
5959
output: [{
6060
file: "dist/zip-no-worker.min.js",
6161
format: "umd",
62-
name: "zip"
62+
name: "zip",
63+
plugins: [terser()]
6364
}],
64-
plugins: [nodeResolve(), terser()]
65+
plugins: [nodeResolve()]
6566
}, {
6667
input: "lib/zip-no-worker-fflate-deflate.js",
6768
output: [{
6869
file: "dist/zip-no-worker-deflate.min.js",
6970
format: "umd",
70-
name: "zip"
71+
name: "zip",
72+
plugins: [terser()]
7173
}],
72-
plugins: [nodeResolve(), terser()]
74+
plugins: [nodeResolve()]
7375
}, {
7476
input: "lib/zip-no-worker-fflate-inflate.js",
7577
output: [{
7678
file: "dist/zip-no-worker-inflate.min.js",
7779
format: "umd",
78-
name: "zip"
80+
name: "zip",
81+
plugins: [terser()]
7982
}],
80-
plugins: [nodeResolve(), terser()]
83+
plugins: [nodeResolve()]
8184
}, {
8285
input: "lib/zip-fs.js",
8386
output: [{
@@ -88,21 +91,20 @@ export default [{
8891
}, {
8992
file: "dist/zip-fs.js",
9093
format: "umd",
91-
name: "zip",
92-
plugins: []
93-
}]
94+
name: "zip"
95+
}],
96+
plugins: [nodeResolve()]
9497
}, {
9598
input: "index-fflate.js",
9699
output: [{
97-
file: "dist/zip-fs-full.js",
98-
format: "umd",
99-
name: "zip",
100-
plugins: []
101-
}, {
102100
file: "dist/zip-fs-full.min.js",
103101
format: "umd",
104102
name: "zip",
105103
plugins: [terser()]
104+
}, {
105+
file: "dist/zip-fs-full.js",
106+
format: "umd",
107+
name: "zip"
106108
}],
107109
plugins: [nodeResolve()]
108110
}, {
@@ -111,5 +113,6 @@ export default [{
111113
file: "dist/z-worker.js",
112114
format: "iife",
113115
plugins: [terser()]
114-
}]
116+
}],
117+
plugins: [nodeResolve()]
115118
}];

rollup.config.dev.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ export default [{
2727
output: [{
2828
file: "dist/zip.min.js",
2929
format: "umd",
30-
name: "zip",
31-
plugins: []
30+
name: "zip"
3231
}, {
3332
file: "dist/zip.js",
3433
format: "umd",
@@ -39,8 +38,7 @@ export default [{
3938
output: [{
4039
file: "dist/zip-full.min.js",
4140
format: "umd",
42-
name: "zip",
43-
plugins: []
41+
name: "zip"
4442
}, {
4543
file: "dist/zip-full.js",
4644
format: "umd",
@@ -81,11 +79,11 @@ export default [{
8179
}, {
8280
input: "index.js",
8381
output: [{
84-
file: "dist/zip-fs-full.js",
82+
file: "dist/zip-fs-full.min.js",
8583
format: "umd",
8684
name: "zip"
8785
}, {
88-
file: "dist/zip-fs-full.min.js",
86+
file: "dist/zip-fs-full.js",
8987
format: "umd",
9088
name: "zip"
9189
}]

rollup.config.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export default [{
44
input: "lib/z-worker.js",
55
output: [{
66
file: "lib/z-worker-inline.js",
7-
format: "es"
8-
}],
9-
plugins: [terser()]
7+
format: "es",
8+
plugins: [terser()]
9+
}]
1010
}, {
1111
input: "lib/z-worker-inline.js",
1212
output: [{
@@ -23,9 +23,9 @@ export default [{
2323
configure({ workerScripts: { inflate: [uri], deflate: [uri] } });
2424
}
2525
};`,
26-
format: "esm"
27-
}],
28-
plugins: [terser()]
26+
format: "esm",
27+
plugins: [terser()]
28+
}]
2929
}, {
3030
input: ["lib/zip.js"],
3131
output: [{
@@ -89,14 +89,14 @@ export default [{
8989
}, {
9090
input: "index.js",
9191
output: [{
92-
file: "dist/zip-fs-full.js",
93-
format: "umd",
94-
name: "zip"
95-
}, {
9692
file: "dist/zip-fs-full.min.js",
9793
format: "umd",
9894
name: "zip",
9995
plugins: [terser()]
96+
}, {
97+
file: "dist/zip-fs-full.js",
98+
format: "umd",
99+
name: "zip"
100100
}]
101101
}, {
102102
input: "lib/z-worker-bootstrap-pako.js",

0 commit comments

Comments
 (0)