Skip to content

Commit

Permalink
dexie-cloud-addon: Remove console.log in release
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Sep 27, 2023
1 parent 79af2e1 commit 4b7659e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 25 deletions.
9 changes: 5 additions & 4 deletions addons/dexie-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
"just-build dexie-cloud service-worker",
"#dts-bundle-generator --external-inlines=dexie-cloud-common --external-imports=rxjs dexie --project src/tsconfig.json -o dist/types/dexie-cloud-addon.d.ts tools/tmp/modern/dexie-cloud-client.d.ts",
"# Minify modern bundle",
"terser --comments false --compress --mangle --module --source-map url=dexie-cloud-addon.min.js.map -o dist/modern/dexie-cloud-addon.min.js -- dist/modern/dexie-cloud-addon.js",
"terser --comments false --module --config-file tools/build-configs/terser-config.json --source-map url=dexie-cloud-addon.min.js.map -o dist/modern/dexie-cloud-addon.min.js -- dist/modern/dexie-cloud-addon.js",
"# Minify umd bundle",
"terser --comments false --compress --mangle --source-map url=dexie-cloud-addon.min.js.map -o dist/umd/dexie-cloud-addon.min.js -- dist/umd/dexie-cloud-addon.js",
"terser --comments false --config-file tools/build-configs/terser-config.json --source-map url=dexie-cloud-addon.min.js.map -o dist/umd/dexie-cloud-addon.min.js -- dist/umd/dexie-cloud-addon.js",
"# Minify modern service-worker",
"terser --comments false --compress --mangle --module --source-map url=service-worker.min.js.map -o dist/modern/service-worker.min.js -- dist/modern/service-worker.js",
"terser --comments false --module --config-file tools/build-configs/terser-config.json --source-map url=service-worker.min.js.map -o dist/modern/service-worker.min.js -- dist/modern/service-worker.js",
"# Minify umd service-worker",
"terser --comments false --compress --mangle --source-map url=service-worker.min.js.map -o dist/umd/service-worker.min.js -- dist/umd/service-worker.js"
"terser --comments false --config-file tools/build-configs/terser-config.json --source-map url=service-worker.min.js.map -o dist/umd/service-worker.min.js -- dist/umd/service-worker.js"
],
"src": [
"# Build the entire typescript source into modern JS",
Expand Down Expand Up @@ -121,6 +121,7 @@
"rollup-plugin-dts": "^4.0.1",
"rollup-plugin-node-resolve": "*",
"rollup-plugin-sourcemaps": "*",
"terser": "^5.20.0",
"tslib": "*",
"typescript": "^4.9.4"
},
Expand Down
7 changes: 7 additions & 0 deletions addons/dexie-cloud/tools/build-configs/terser-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compress": {
"drop_console": true,
"drop_debugger": true
},
"mangle": true
}
44 changes: 23 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b7659e

Please sign in to comment.