Skip to content

Commit

Permalink
Cleans every build and adds a test command to verify TS builds succes…
Browse files Browse the repository at this point in the history
…sfully.

If we don't clean every build, then the deleted TS files still remain in the `dist/` folder from previous compilations and can cause unexpected issues.
  • Loading branch information
dgp1130 committed Oct 30, 2022
1 parent d574a52 commit 4a6dbc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
"./context": "./context.js"
},
"scripts": {
"start": "npm run -s build && npm run -s serve",
"start": "npm run -s clean && npm run -s build && npm run -s serve",
"build": "npm run -s build-ts && npm run -s build-html && npm run -s build-package",
"build-ts": "tsc && ln -f -s ../node_modules dist/",
"build-html": "cp src/examples/*.html dist/examples/",
"build-package": "cp package.json dist/package.json",
"serve": "node dist/examples/server.js",
"test": "npm run -s build-ts",
"clean": "rm -rf dist/"
},
"license": "MIT",
Expand Down

0 comments on commit 4a6dbc7

Please sign in to comment.