fedwiki / wiki-client

Federated wiki client-side javascript as a npm module.
Other
117 stars 38 forks source link

Updating Decaffeinated Build #324

Closed paul90 closed 2 weeks ago

paul90 commented 2 months ago

This is a work in progress, commits are in bite sized chunks to help with explaining the changes.

Before replacing Grunt/Browserify build process, replace Node:events (f009685dfe7b850ed1d74f2dda8a7fcf95d6f52f) and Node:url (6afcaf0276ff88174bc7740f3e650546b00b1d2f) with their browser equivalents.

Update the node versions used in the test action, and modify .gitignore, pre-empting some of the changes happening next. (930c000c731775646619fc43b3ee78569e90d5fd) and (db6301a11d7e84645c17d6d45f00e334344befd5)

paul90 commented 2 months ago

Update github actions so they run on push and PRs associated with the decaffeinate branch.

Remember to modify this when renaming the branches later.

paul90 commented 2 months ago

Replacing grunt/browserify with esbuild.

This gives javascript map files that work, so only need the minified build.

To build run npm run build. To run the in browser test npm run runtests, and npm run test for those that can be run in the terminal.

The build process creates a metafile meta-client.json, that can be uploaded to esbuild: Bundle Size Analyzer to visualize the contents of the build.

paul90 commented 2 months ago

Update the version of mocha that is included in the client/test directory (previous version was ancient, at least 9 years old!).

A small associated change from global.wiki to globalThis.wiki in two of the test files.

paul90 commented 2 months ago

And a script to update the authors file npm run update-authors.

I have left decaffeinate <paul.rodwell@btinternet.com> as a contributor, as it marks a significant point in history.

paul90 commented 2 months ago

Modify npm run build to run tests before building the client and test client. This makes it more like grunt build.