Skip to content

Latest commit

 

History

History
99 lines (65 loc) · 1.25 KB

File metadata and controls

99 lines (65 loc) · 1.25 KB

Local Development

JavaScript Client Development

Download and install NPM. On a mac, can be installed via homebrew:

brew install npm

Install client dependencies

cd client
npm install

Recommended: Use direnv to automatically load environment from .env

brew install direnv
direnv allow

Building

Build JavaScript client

cd client
npm run build

Watch for changes during development

cd client
npm run dev

Haskell Server Development

Run demo locally. Then visit

cabal run demo

Linting and Formatting

JavaScript client:

cd client
npm run lint
npm run fmt:check

Haskell:

hlint .
fourmolu --mode inplace $(git ls-files '*.hs')

Tests

JavaScript client:

cd client
npm test

Haskell:

cabal test

File watching

Run tests, then recompile both client and server on file change, then restart demo

bin/dev

Haskell Language Server

We use a custom preprocessor to embed compiler-checked examples into Haddock. Everything is automatic with Cabal, but HLS doesn't support it yet. Run this command to get HLS working:

cabal install hyperbole:docgen --overwrite-policy=always