Closed ocavue closed 4 months ago
=============================================================================== Language Files Lines Code Comments Blanks =============================================================================== TOML 1 77 65 2 10 ------------------------------------------------------------------------------- Rust 66 14563 12457 200 1906 |- Markdown 35 343 0 272 71 (Total) 14906 12457 472 1977 =============================================================================== Total 67 14640 12522 202 1916 ===============================================================================
This is excellent - thank you!
This PR includes multiple improvements for the CI workflow:
Add a root
package.json
, which specifies the version of Node.js package managerpnpm
andwasm-pack
. It's a good idea to explicitly declare the dependencies and their versions (see 12-factors for explanation).Notice that I didn't use the latest version of
pnpm
andwasm-pack
, which were released very recently. I assume that this project is using an older version of these two dependencies during development. We can update the version in a separate PR.In
justfile
, use the localwasm-pack
binary undernode_modules/.bin
, instead of the global binary inPATH
. This ensures that we can use different versions ofwasm-pack
in different projects without affecting others.Add a new job
build
in.github/workflows/rust.yml
. Thisrust.yml
now has two jobs:check
andbuild
. Although thecheck
job is failing in themaster
branch, I can makebuild
work. I extracted the common part of the two jobs (i.e., installing dependencies) into.github/actions/setup/action.yml
so that we can reuse them in both jobs without copy-and-paste.In the job
build
, I use pkg.pr.new to publishratchet-web
for every pushed Git commit. In every pull request, you can see a bot commit like this one to show annpm install
command that can install the built version of this package.pkg.pr.new
is for a faster development feedback loop, and it doesn't actually publish packages to the NPM registry. I will address the NPM registry publishing in a different pull request.Finally, I've updated
CONTRIBUTING.md
to include some changes aboutpnpm
introduced in this PR, as well as to fix some incorrect Markdown heading levels.