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

Switch to tsup for building the dist #241

Merged
merged 6 commits into from
Feb 17, 2025
Merged

Switch to tsup for building the dist #241

merged 6 commits into from
Feb 17, 2025

Conversation

karlobencic
Copy link
Contributor

  • Added tsup as the build tool to replace raw tsc
  • Configured tsup to output ES modules with proper directory structure
  • Simpler and faster builds
  • Better tree-shaking through ES modules
  • Cleaner output structure without src directory nesting

@karlobencic karlobencic requested a review from cyraxx February 14, 2025 16:17
Copy link

changeset-bot bot commented Feb 14, 2025

🦋 Changeset detected

Latest commit: 2882fe4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@trustnxt/c2pa-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cyraxx
Copy link
Contributor

cyraxx commented Feb 14, 2025

A couple of questions:

  • Is prebuild and postbuild called by tsup? Does it ensure postbuild is executed even after a failed build?
  • The entire purpose of prebuild and postbuild is to set the current version number in Version.ts – could this be replaced by compile-time variables?
  • With clean: true, I think we don't need the rimraf anymore

@karlobencic
Copy link
Contributor Author

A couple of questions:

  • Is prebuild and postbuild called by tsup? Does it ensure postbuild is executed even after a failed build?
  • The entire purpose of prebuild and postbuild is to set the current version number in Version.ts – could this be replaced by compile-time variables?
  • With clean: true, I think we don't need the rimraf anymore

No, prebuild/postbuild are called by npm, not tsup. This means postbuild won't run if the build fails, I've now made a better approach by removing those scripts and using compile-time variables.

Copy link
Contributor

@cyraxx cyraxx left a comment

Choose a reason for hiding this comment

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

The missing prop should go into a separate PR or at least have its own entry in the changeset. The tsup change itself seems fine.

@karlobencic karlobencic merged commit e8a9d1a into main Feb 17, 2025
3 checks passed
@karlobencic karlobencic deleted the feature/tsup branch February 17, 2025 22:31
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