Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug code using the DEBUG label #80

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Add debug code using the DEBUG label #80

merged 3 commits into from
Jul 30, 2024

Conversation

Pomax
Copy link
Member

@Pomax Pomax commented Jul 29, 2024

  • adds DEBUG: ... statements in a bunch of places.
  • added a build task so we now build a debug.esm.js, with all debug code preserved, and the esm.js/esm.min.js versions with debug code stripped out
  • the debug version only gets built locally, being both in the .gitignore and .npmignore
  • the server swaps out the request for .min.js for the debug version instead, so that manual testing using npm start uses the debug bundle
  • also sneaks in a typing fix for setTimeout
  • also sneaks in tsc as linter pass, with an update to the README.md for anyone who might want to help fix something in the code.

Closes #79

// problem. Similarly, native-typescript engines like Deno or Bun *do* follow
// the spec and so the following typing is correct when running in those.
private _pressHoldIntervalId?: number | undefined;
private _pressHoldIntervalId?: ReturnType<typeof setTimeout> | undefined;
Copy link
Member Author

Choose a reason for hiding this comment

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

A handy way to circumvent "this could be Node, or could be the browser, we don't know" =)

@Pomax Pomax requested a review from Bernardo-Castilho July 29, 2024 03:31
@Pomax Pomax merged commit 1fc302b into master Jul 30, 2024
3 checks passed
@Pomax Pomax deleted the issue-79 branch July 30, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add DEBUG to the source
2 participants