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

TS Bindings: Minify generated files #1652

Closed
wants to merge 1 commit into from

Conversation

t0fudev
Copy link

@t0fudev t0fudev commented Oct 4, 2024

What

  • Add terser package to minify ES6 files.
  • Add minify script to run terser.
  • Modify build script to run minify after transpilation.

Why

Closes #1154.

I was wondering if the output file should be named index.min.js or should I name it index.js to replace the original file. Also, I would like to know how can I test my changes to ensure everything is working properly. Thanks in advance!

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: filesystem, shell +11 4.31 MB fabiosantoscode

View full report↗︎

@willemneal willemneal requested a review from chadoh October 7, 2024 13:59
@janewang janewang requested a review from willemneal October 29, 2024 19:58
Copy link
Contributor

@chadoh chadoh left a comment

Choose a reason for hiding this comment

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

I was wondering if the output file should be named index.min.js or should I name it index.js

I think it's probably fine to only ship it with a single, minified index.js.

There are tests in cmd/crates/soroban-spec-typescript/ts-tests. You can use these to make sure it's working!

It looks like you only found the built artifacts in the fixtures folder. If you check the GitHub PR files, you'll see that we've set all of these to be hidden, because they're a transient artifact, and will be wiped if you run make build-snapshot! You'll want to make your changes in cmd/crates/soroban-spec-typescript/src/project_template. Then you can run make build-snapshot to replace what's in that fixtures directory you edited.

@leighmcculloch leighmcculloch marked this pull request as draft November 6, 2024 13:24
@janewang
Copy link
Contributor

Closing PR due to no activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

TS Bindings: Minify generated files
3 participants