Skip to content

Commit

Permalink
fix differences
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas-lormeau committed Jan 22, 2022
1 parent 27287c5 commit f83228c
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 63 deletions.
13 changes: 7 additions & 6 deletions rollup-es5.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ export default [{
input: "lib/z-worker-inline-template-base64.js",
output: [{
file: "lib/z-worker-inline.js",
format: "esm"
}],
plugins: [replace({
preventAssignment: true,
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
})]
format: "esm",
plugins: [
replace({
preventAssignment: true,
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
})]
}]
}, {
input: ["lib/zip.js"],
output: [{
Expand Down
18 changes: 9 additions & 9 deletions rollup-es5.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ export default [{
input: "lib/z-worker-inline-template-base64.js",
output: [{
file: "lib/z-worker-inline.js",
format: "esm"
}],
plugins: [
replace({
preventAssignment: true,
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
}),
terser()
]
format: "esm",
plugins: [
replace({
preventAssignment: true,
"__workerCode__": () => JSON.stringify(fs.readFileSync("lib/z-worker-inline.js", { encoding: "base64" }))
}),
terser()
]
}]
}, {
input: ["lib/zip.js"],
output: [{
Expand Down
17 changes: 10 additions & 7 deletions rollup-fflate.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default [{
input: "lib/z-worker-fflate.js",
output: [{
file: "lib/z-worker-inline.js",
format: "es"
format: "umd"
}],
plugins: [nodeResolve()]
}, {
Expand All @@ -19,7 +19,7 @@ export default [{
file: "lib/z-worker-inline.js",
outro:
` \`;
const uri = URL.createObjectURL(new Blob(["(" + code + ")()"], { type : "text/javascript" }));
const uri = URL.createObjectURL(new Blob([code], { type : "text/javascript" }));
configure({ workerScripts: { inflate: [uri], deflate: [uri] } });
}
};`,
Expand All @@ -35,7 +35,8 @@ export default [{
file: "dist/zip.js",
format: "umd",
name: "zip"
}]
}],
plugins: [nodeResolve()]
}, {
input: ["lib/zip-full-fflate.js"],
output: [{
Expand Down Expand Up @@ -82,15 +83,16 @@ export default [{
file: "dist/zip-fs.js",
format: "umd",
name: "zip"
}]
}],
plugins: [nodeResolve()]
}, {
input: "index-fflate.js",
output: [{
file: "dist/zip-fs-full.js",
file: "dist/zip-fs-full.min.js",
format: "umd",
name: "zip"
}, {
file: "dist/zip-fs-full.min.js",
file: "dist/zip-fs-full.js",
format: "umd",
name: "zip"
}],
Expand All @@ -100,5 +102,6 @@ export default [{
output: [{
file: "dist/z-worker.js",
format: "iife"
}]
}],
plugins: [nodeResolve()]
}];
53 changes: 28 additions & 25 deletions rollup-fflate.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ export default [{
input: "lib/z-worker-fflate.js",
output: [{
file: "lib/z-worker-inline.js",
format: "es"
format: "es",
plugins: [terser()]
}],
plugins: [nodeResolve(), terser()]
plugins: [nodeResolve()]
}, {
input: "lib/z-worker-inline.js",
output: [{
Expand All @@ -24,9 +25,9 @@ export default [{
configure({ workerScripts: { inflate: [uri], deflate: [uri] } });
}
};`,
format: "esm"
}],
plugins: [terser()]
format: "esm",
plugins: [terser()]
}]
}, {
input: ["lib/zip.js"],
output: [{
Expand All @@ -37,9 +38,9 @@ export default [{
}, {
file: "dist/zip.js",
format: "umd",
name: "zip",
plugins: []
}]
name: "zip"
}],
plugins: [nodeResolve()]
}, {
input: ["lib/zip-full-fflate.js"],
output: [{
Expand All @@ -50,34 +51,36 @@ export default [{
}, {
file: "dist/zip-full.js",
format: "umd",
name: "zip",
plugins: []
name: "zip"
}],
plugins: [nodeResolve()]
}, {
input: "lib/zip-no-worker-fflate.js",
output: [{
file: "dist/zip-no-worker.min.js",
format: "umd",
name: "zip"
name: "zip",
plugins: [terser()]
}],
plugins: [nodeResolve(), terser()]
plugins: [nodeResolve()]
}, {
input: "lib/zip-no-worker-fflate-deflate.js",
output: [{
file: "dist/zip-no-worker-deflate.min.js",
format: "umd",
name: "zip"
name: "zip",
plugins: [terser()]
}],
plugins: [nodeResolve(), terser()]
plugins: [nodeResolve()]
}, {
input: "lib/zip-no-worker-fflate-inflate.js",
output: [{
file: "dist/zip-no-worker-inflate.min.js",
format: "umd",
name: "zip"
name: "zip",
plugins: [terser()]
}],
plugins: [nodeResolve(), terser()]
plugins: [nodeResolve()]
}, {
input: "lib/zip-fs.js",
output: [{
Expand All @@ -88,21 +91,20 @@ export default [{
}, {
file: "dist/zip-fs.js",
format: "umd",
name: "zip",
plugins: []
}]
name: "zip"
}],
plugins: [nodeResolve()]
}, {
input: "index-fflate.js",
output: [{
file: "dist/zip-fs-full.js",
format: "umd",
name: "zip",
plugins: []
}, {
file: "dist/zip-fs-full.min.js",
format: "umd",
name: "zip",
plugins: [terser()]
}, {
file: "dist/zip-fs-full.js",
format: "umd",
name: "zip"
}],
plugins: [nodeResolve()]
}, {
Expand All @@ -111,5 +113,6 @@ export default [{
file: "dist/z-worker.js",
format: "iife",
plugins: [terser()]
}]
}],
plugins: [nodeResolve()]
}];
10 changes: 4 additions & 6 deletions rollup.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export default [{
output: [{
file: "dist/zip.min.js",
format: "umd",
name: "zip",
plugins: []
name: "zip"
}, {
file: "dist/zip.js",
format: "umd",
Expand All @@ -39,8 +38,7 @@ export default [{
output: [{
file: "dist/zip-full.min.js",
format: "umd",
name: "zip",
plugins: []
name: "zip"
}, {
file: "dist/zip-full.js",
format: "umd",
Expand Down Expand Up @@ -81,11 +79,11 @@ export default [{
}, {
input: "index.js",
output: [{
file: "dist/zip-fs-full.js",
file: "dist/zip-fs-full.min.js",
format: "umd",
name: "zip"
}, {
file: "dist/zip-fs-full.min.js",
file: "dist/zip-fs-full.js",
format: "umd",
name: "zip"
}]
Expand Down
20 changes: 10 additions & 10 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ export default [{
input: "lib/z-worker.js",
output: [{
file: "lib/z-worker-inline.js",
format: "es"
}],
plugins: [terser()]
format: "es",
plugins: [terser()]
}]
}, {
input: "lib/z-worker-inline.js",
output: [{
Expand All @@ -23,9 +23,9 @@ export default [{
configure({ workerScripts: { inflate: [uri], deflate: [uri] } });
}
};`,
format: "esm"
}],
plugins: [terser()]
format: "esm",
plugins: [terser()]
}]
}, {
input: ["lib/zip.js"],
output: [{
Expand Down Expand Up @@ -89,14 +89,14 @@ export default [{
}, {
input: "index.js",
output: [{
file: "dist/zip-fs-full.js",
format: "umd",
name: "zip"
}, {
file: "dist/zip-fs-full.min.js",
format: "umd",
name: "zip",
plugins: [terser()]
}, {
file: "dist/zip-fs-full.js",
format: "umd",
name: "zip"
}]
}, {
input: "lib/z-worker-bootstrap-pako.js",
Expand Down

0 comments on commit f83228c

Please sign in to comment.