Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"ascMain": "assembly/index.ts",
"types": "assembly/index.ts",
"scripts": {
"pretest": "npm run asbuild:empty",
"test": "asp --verbose --nologo && npm run test:empty",
"pretest:empty": "npm run asbuild:empty",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this work, you may ask.

pre and post hooks can be added to any npm script by just prefixing it with pre or post.
https://docs.npmjs.com/cli/v7/using-npm/scripts#pre--post-scripts

"test:empty": "diff build/empty.wat assembly/__tests__/empty.wat",
"test:ci": "asp --summary && npm run test:empty",
"asbuild:untouched": "asc assembly/index.ts --target debug",
Expand Down