Skip to content

Commit

Permalink
Extend development documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Oct 14, 2024
1 parent f6031db commit 24db160
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 38 deletions.
53 changes: 15 additions & 38 deletions docs-source/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 24db160

Please sign in to comment.