forked from Euterpea/Euterpea2
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjustfile
61 lines (46 loc) · 1.38 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Default task
default: build
# Build the project
build:
stack build
# Build the project
build-watch:
stack build --file-watch --fast
# Clean and rebuild the project
clean-build: clean-full build
# Test the project
test:
stack test
# Run tests with watch mode
test-watch:
stack test --file-watch
# Clean the project
clean:
stack clean
# Deep clean - removes all build artifacts and dependencies
clean-full:
stack clean --full
rm -rf .stack-work
# Generate Haddock documentation
docs-no-show:
stack haddock
@echo "Documentation generated. Open .stack-work/dist/*/doc/html/*/index.html in your browser"
# Generate and open documentation in default browser
docs: docs-no-show
@if command -v xdg-open > /dev/null; then \
xdg-open `find .stack-work/dist -name index.html | grep -v "/doc/html/$" | head -n1`; \
elif command -v open > /dev/null; then \
open `find .stack-work/dist -name index.html | grep -v "/doc/html/$" | head -n1`; \
fi
# Format Haskell project with ormolu
format:
echo "Formating the Haskell project."
find ./src -name '*.hs' | xargs ormolu -i
find ./test -name '*.hs' | xargs ormolu -i
find ./bench -name '*.hs' | xargs ormolu -i
# Bench
bench:
stack bench --flag euterpea:bench
# Run specific benchmark (usage: just bench-suite suite-name)
bench-suite suite-name:
stack bench :${suite-name}