Skip to content

Commit

Permalink
fix: add minified version
Browse files Browse the repository at this point in the history
  • Loading branch information
christianmat committed Oct 28, 2024
1 parent ac642a6 commit 4c31f10
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-pigs-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'trench-js': patch
---

Removes redundant logging and adds minified version
7 changes: 4 additions & 3 deletions packages/trench-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"scripts": {
"build": "tsc",
"build": "tsc && esbuild src/index.ts --bundle --minify --target=chrome58 --minify-identifiers=false > dist/trench.min.js",
"test": "jest"
},
"repository": {
Expand All @@ -33,11 +33,12 @@
"homepage": "https://github.com/frigadehq/trench/packages/analytics-plugin-trench#readme",
"devDependencies": {
"@types/jest": "29.5.13",
"esbuild": "^0.24.0",
"jest": "^29.5.0",
"jest-config": "^29.3.1",
"jest-environment-jsdom": "^29.4.1",
"ts-jest": "^29.1.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"tslint": "6.1.3",
"tslint-plugin-prettier": "2.3.0",
"tsup": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/trench-js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Trench {
}

track(event: string, properties: Record<string, unknown>) {
console.log('response', this.analytics.track(event, properties));
this.analytics.track(event, properties);
}

page(properties: Record<string, unknown>) {
Expand Down
Loading

0 comments on commit 4c31f10

Please sign in to comment.