/spiced-tea

bucklescript-tea with Melange (Nix workflow)

Primary LanguageOCaml

bucklescript-tea with Melange (Nix workflow)

Execute the following steps to produce an executable output in _build/default/src dir, and a running server that serves the app from that dir.

  1. cd spiced-tea
  2. Configure flake to automatically load on cd: direnv allow
  3. yarn install
  4. Reload the flake so that melange runtime libs are symlinked to node_modules/melange (which node/js utilities need to run melange): cd .. && cd spiced-tea
  5. mel clean
  6. mel build
  7. cp ./src/{index.html,index.js} _build/default/src/
  8. ./node_modules/.bin/browserify _build/default/src/index.js -o _build/default/src/index.br.js
  9. ./node_modules/.bin/http-server _build/default/src

There is a lot of scope to improve the workflow. But this is the bare minimum.