-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJustfile
68 lines (54 loc) · 1.79 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
60
61
62
63
64
65
66
67
68
#!/usr/bin/env just --justfile
# Documentation: https://just.systems/man/en/
set shell := ['nu', '-c']
# Integration with nodejs package.json scripts, see https://just.systems/man/en/chapter_65.html
export PATH := env('PWD') / 'node_modules/.bin:' + env('PATH')
WEBSITE := "dws.identinet.io"
# Print this help
default:
@just -l
# Format Justfile
format:
@just --fmt --unstable
# Install application dependencies
install:
yarn install
# Run and watch application for development purposes
dev:
yarn run start
# Update figures
update-figures:
# Updates https://hub.docker.com/r/plantuml/plantuml/tags
docker run -u $"(id -u):(id -g)" -v $"($env.PWD):/app" -w /app plantuml/plantuml:1.2024.4 -charset UTF-8 -nbthread auto -failfast2 -tsvg $"-DDATE=(date now | format date "%Y-%m-%d")" figures/*.puml
rm -rpf ?
# Watch for changes and regenerate figures
watch-figures: update-figures
watch figures --glob=**/*.puml {|| just update-figures }
# Build production application
build: update-figures
# #!/usr/share/just-docker/env --image=node:20 bash
yarn run build
# Preview production build
preview:
yarn run preview
# Update dependencies
update-dependencies:
yarn upgrade-interactive --latest
# Publish website
publish: build
#!/usr/bin/env nu
^find "_websites/{{ WEBSITE }}" -mindepth 1 -maxdepth 1 -not -name .git -not -name CNAME -not -name _config.yml -not -name .well-known | xargs rm -rf
cp -r dist/* "_websites/{{ WEBSITE }}"
cd "_websites/{{ WEBSITE }}"
git add -A .
if (git status -s --porcelain | str trim) != "" {
git commit -m "chore: update docs"
git push
cd -
git add "_websites/{{ WEBSITE }}"
git commit -n -m "Update docs repository"
git push
}
# Clean files
clean:
yarn run clear