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

Adding the new code-gen package #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SergioCasCeb
Copy link

This PR is meant to include the code generator as a new tool within the td-tools repository.

Although it can already be used, this package still lacks the appropriate bundling (browser and esm). I attempted to generate the respective bundles with browserify and babel as well as with esbuild, but they all failed, and I have not been able to make them work properly.

  • Browserify and Babel failed even to create the bundle, so it cannot even be tested.
  • Esbuild creates the respective bundles, but when trying to implement them in Playground, it fails.

This link shows the esbuild.js file that I was utilizing for the esbuild bundling. @relu91 Since I am using basically the same esbuild file that was used for the node-wot browser bundle, do you by any chance know what might be happening, or any recommendation in general?

Also, for more context on what is going on, here are a few screenshots of the errors that I always end up encountering.
Screenshot 2025-03-31 142538
Screenshot 2025-03-31 142654

Notes:

  • Tests will be added later on.
  • The way to get the Templates will also be changed to not rely on fetching from GitHub.
  • The contribution section within the README file will also change once the Templates are fixed.

@relu91
Copy link
Member

relu91 commented Mar 31, 2025

To clarify, are you trying to bundle the whole tool or just the generated code? if you are trying to bundle the whole tool, what is the purpose? support both browser and node?

@SergioCasCeb
Copy link
Author

The purpose is to bundle the whole tool to better support browsers and Node.

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