diff --git a/docs-source/development.md b/docs-source/development.md index 8f147b2..ee23d9b 100644 --- a/docs-source/development.md +++ b/docs-source/development.md @@ -27,58 +27,35 @@ [ULID]: https://github.com/ulid/spec -**Check out the [makefile] for all development tasks** +## Development Environment -[makefile]: https://github.com/ad-si/TaskLite/blob/master/makefile - - -## Ghcid - -Ghcid with color output for GHC 8.4 (probably obsolete in 8.6): +The recommended way to develop Haskell +is with [VS Code] and the [Haskell Language Server]. -```sh -ghcid \ - --command="stack ghci --ghci-options=-fdiagnostics-color=always" -``` +[VS Code]: https://code.visualstudio.com +[Haskell Language Server]: + https://marketplace.visualstudio.com/items?itemName=haskell.haskell -## HLint +## Getting Started -```sh -hlint \ - --ignore="Redundant do" \ - --ignore="Use list literal" \ - --ignore="Use String" \ - --ignore="Redundant bracket" \ - --ignore="Use camelCase" \ - . -``` +Check out the [makefile] for all development tasks. +[makefile]: https://github.com/ad-si/TaskLite/blob/master/makefile -## Webapp - -### Build Images - -Build base image for webapp runtime image: - -```sh -docker build \ - --file tasklite-core/dockerfiles/haskell-datasette \ - --tag haskell-datasette \ - dockerfiles -``` +The most important command is `make test` to run the tests after any changes. +They should always pass before committing. -Build runtime image: +To try out local changes via the CLI you can use the following command: ```sh -stack image container -docker tag adius/tasklite-tasklite:latest adius/tasklite:latest +stack run -- add "Buy milk" ``` -### Deployment +## Deployment -On Google Cloud: +### Google Cloud ```sh docker tag adius/tasklite-tasklite:latest gcr.io/deploy-219812/tasklite:latest diff --git a/makefile b/makefile index 62720ba..58b1ea4 100644 --- a/makefile +++ b/makefile @@ -10,6 +10,17 @@ start-app: npx elm-app start +.PHONY: lint +lint: + hlint \ + --ignore="Redundant do" \ + --ignore="Use list literal" \ + --ignore="Use String" \ + --ignore="Redundant bracket" \ + --ignore="Use camelCase" \ + . + + # Explicitly run tests for each package for better console output .PHONY: test test: