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: add bundling/build-cjs.ts #469

Closed
wants to merge 5 commits into from
Closed

build: add bundling/build-cjs.ts #469

wants to merge 5 commits into from

Conversation

wojpawlik
Copy link
Contributor

Alternative to wojpawlik/deno2node#40: reusable script with embedded compilerOptions. Feel free to revert any changes you don't like.

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1c238c0) 46.24% compared to head (8beaebc) 46.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
+ Coverage   46.24%   46.33%   +0.08%     
==========================================
  Files          19       19              
  Lines        5650     5659       +9     
  Branches      227      227              
==========================================
+ Hits         2613     2622       +9     
  Misses       3034     3034              
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

I like these changes a lot! This is a great stepping stone towards #372

bundling/bundle-web.ts Outdated Show resolved Hide resolved
"test": "deno test --seed=123456 --parallel ./test/",
"dev": "deno fmt && deno lint && deno task test && deno task check",
"coverage": "rm -rf ./test/cov_profile && deno task test --coverage=./test/cov_profile && deno coverage --lcov --output=./coverage.lcov ./test/cov_profile",
"report": "genhtml ./coverage.lcov --output-directory ./test/coverage/ && echo 'Point your browser to test/coverage/index.html to see the test coverage report.'",
"bundle": "cd bundling && ./bundle-all.sh",
"bundle-web": "mkdir -p out deno_cache && cd bundling && DENO_DIR=$PWD/../deno_cache deno run --unstable --quiet --allow-net --allow-read --allow-env=DENO_DIR,XDG_CACHE_HOME,HOME,DENO_AUTH_TOKENS --allow-write=../out,$PWD/../deno_cache bundle-web.ts dev ../src/mod.ts",
"contribs": "deno run --allow-env --allow-read --allow-write=. --allow-net=api.github.com npm:all-contributors-cli"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accidentally removed this while resolving conflicts 🙈 pin to a major release and tighten permission when restoring.

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

Can the web build be integrated into the CJS+ESM build script so that a single script invocation builds the entire package?

@wojpawlik
Copy link
Contributor Author

Yes, if you forego bundling, and use v2-only Context::changeRuntimeTo(). I suggest waiting until runtime switching is added to grammY 2.0.

@KnorpelSenf
Copy link
Member

I think we're just going to migrate to JSR and cross-publish the packages to npm so that we can get rid of the build step entirely

@KnorpelSenf
Copy link
Member

Will likely be superseded by #559

@KnorpelSenf
Copy link
Member

Decided

@KnorpelSenf KnorpelSenf deleted the build-cjs branch May 17, 2024 11:35
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