Skip to content

Commit

Permalink
MAINTENANCE
Browse files Browse the repository at this point in the history
* Add prepublishOnly to avoid version problems!
  • Loading branch information
tonysamperi committed May 24, 2023
1 parent 73a25eb commit 2f8a7ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"node": ">=13"
},
"scripts": {
"prepublishOnly": "node ./test/test-dist.js",
"build:watch": "rollup -c rollup.config.js -w",
"build": "rollup -c rollup.config.js",
"jest": "jest",
Expand Down
7 changes: 7 additions & 0 deletions test/test-dist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(() => {
const tsLuxon = require("../dist/ts-luxon.umd");
const pkg = require("../package.json");
if(pkg.version !== tsLuxon.VERSION) {
throw new Error(`Version mismatch! Expected ${pkg.version}, got ${tsLuxon.VERSION}. Rebuild the package to solve!`);
}
})();

0 comments on commit 2f8a7ad

Please sign in to comment.