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

feat: add minified fuels distribution #2762

Merged
merged 9 commits into from
Jul 16, 2024

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Jul 12, 2024

Summary

  • Added a minified version of the fuels distribution for use in CDNJS. I've used uglifyjs for minification based upon the following benchmarks.

Checklist

  • I addedtests to prove my changes
  • I updated — all the necessary docs
  • I reviewed — the entire PR myself, using the GitHub UI
  • I described — all breaking changes and the Migration Guide

@petertonysmith94 petertonysmith94 added the feat Issue is a feature label Jul 12, 2024
@petertonysmith94 petertonysmith94 added this to the 0.x post-launch milestone Jul 12, 2024
@petertonysmith94 petertonysmith94 self-assigned this Jul 12, 2024
@petertonysmith94
Copy link
Contributor Author

I will add relevant documentation once released to CDNJS.

@arboleya arboleya modified the milestones: 0.x post-launch, 0.x mainnet Jul 13, 2024
arboleya
arboleya previously approved these changes Jul 13, 2024
.changeset/shiny-paws-chew.md Show resolved Hide resolved
danielbate
danielbate previously approved these changes Jul 15, 2024
Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

LGTM. And apologies for ignorance with CDNJS, but is there any further integration needed there?

@petertonysmith94
Copy link
Contributor Author

LGTM. And apologies for ignorance with CDNJS, but is there any further integration needed there?

Yes, we will need to:

  • Release new version with the minified bundle to NPM.
  • Make to changes CDNJS configuration file (fuels.json):
    {
      ...,
      "autoupdate": {
        "source": "npm",
        "target": "fuels",
        "fileMap": [
          {
            "basePath": "dist",
            "files": ["browser.mjs", "browser.min.mjs"]
          }
        ],
        "ignoreVersions": [
          "0.0.0-*"
        ]
      },
      ...,
    }
    (Add minified bundle (browser.min.mjs) and ignoreVersions)

@danielbate
Copy link
Contributor

Yes, we will need to:

Release new version with the minified bundle to NPM.
Make to changes CDNJS configuration file (fuels.json)

Should we not close #1728 till that is done?

arboleya
arboleya previously approved these changes Jul 15, 2024
danielbate
danielbate previously approved these changes Jul 15, 2024
@petertonysmith94 petertonysmith94 enabled auto-merge (squash) July 16, 2024 06:25
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
79.37%(+0%) 71.65%(+0%) 77.3%(+0%) 79.5%(+0%)
Changed Files:

Coverage values did not change👌.

@petertonysmith94 petertonysmith94 merged commit 9c20eb9 into master Jul 16, 2024
19 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/chore/add-minified-distribution branch July 16, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants