diff --git a/Makefile b/Makefile index a8e370e..1ef5759 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,10 @@ test: npm run test-watch # publish to npm +publish: + git push origin "main:publish" + +# publish to npm, called by ci ci-publish: make build-lib mv README.npm-lib.md README.md diff --git a/README.md b/README.md index 2f34063..792471a 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,13 @@ make wasm ``` rebuilds the `twelf.wasm` asset in docker. This artefact is also checked into the repository, and it similarly does not need to be built from a fresh checkout. + +```shell +make deploy +``` +pushes to the `deploy` branch, which causes [this Actions workflow](.github/workflows/static.yml) to rebuild the [static site](https://jcreedcmu.github.io/twelf-wasm). + +```shell +make publish +``` +pushes to the `publish` branch, which causes [this Actions workflow](.github/workflows/publish.yml) to publish [the npm package](https://www.npmjs.com/package/twelf-wasm). diff --git a/README.npm-lib.md b/README.npm-lib.md index f4d5034..9011d26 100644 --- a/README.npm-lib.md +++ b/README.npm-lib.md @@ -1,8 +1,10 @@ Twelf on Wasm Support ===================== -What we publish as an npm library as package `twelf-wasm` is just a -small library. The intended use is for libary users (specifically the -Twelf wiki) to conveniently construct url-fragment arguments with the -`encode` function so that they can link to twelf-wasm and have it load -a particular bit of twelf code at startup. +This npm package `twelf-wasm` is a small library so that callers +(specifically the Twelf wiki) can conveniently construct url-fragment +arguments with the `encode` function so that they can link to +twelf-wasm and have it load a particular bit of twelf code at startup. + +See the main README at https://github.com/jcreedcmu/twelf-wasm for +more details.