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

build: Minify JS builds and keep JSDoc in declaration files #162

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

reobin
Copy link
Member

@reobin reobin commented Feb 14, 2025

Description

Since the library strips all comments when compiling, we lose the JSDoc when consuming the library.

  • Use terser to minify the build and generate sourcemaps
  • Use terser to remove all comments from all compiled JS code
  • Keep JSDoc in typescript declaration files

Allows reading JSDoc in the editor when hovering:

image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation accordingly.

* Use terser to minify the build and generate sourcemaps
* Use terser to remove all comments from all compiled JS code
* Keep JSDoc in typescript declaration files
@reobin reobin self-assigned this Feb 14, 2025
Copy link

vercel bot commented Feb 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
poap-js ⬜️ Ignored (Inspect) Feb 14, 2025 9:52pm

@reobin reobin requested review from rlajous and jm42 February 14, 2025 21:52
@reobin reobin merged commit 6dce09c into main Feb 14, 2025
3 checks passed
@reobin reobin deleted the build/minify-keep-jsdoc branch February 14, 2025 21:56
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.

2 participants