-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaskfile.yml
72 lines (62 loc) · 1.84 KB
/
taskfile.yml
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
69
70
71
72
version: '3'
env:
SRC_FOLDER: src
MARP_CUSTOM_THEME: css/dracula.css
tasks:
setup:
cmds:
- npm install -g markdownlint-cli
- npm install -g @marp-team/marp-cli
- cd slidev ; npm install
- pip install mkdocs
- pip install mkdocs-dracula-theme
# - pip install mkdocs-material
lint:
cmds:
- markdownlint *.md
- cd marp ; markdownlint *.md ; markdownlint src/*.md
- cd slidev ; markdownlint *.md ; markdownlint src/*.md
marp:build:
dir: marp
env:
DEST_FOLDER: '../dist'
cmds:
- find "$SRC_FOLDER" -name '*.md' | grep -v '101' | xargs marp
- marp $SRC_FOLDER/*101.md --theme $MARP_CUSTOM_THEME
- mkdir -p $DEST_FOLDER/img
- cp $SRC_FOLDER/*.html $DEST_FOLDER/
- cp $SRC_FOLDER/img/*.* $DEST_FOLDER/img/
slidev:build:
dir: slidev
env:
DEST_FOLDER: '../dist'
cmds:
- mkdir -p $DEST_FOLDER/assets/images
- cp -r assets/images/*.* $DEST_FOLDER/assets/images/
# - npm run build src/index.md -- --base presentations -o ../$DEST_FOLDER
# npm run build "$SRC_FOLDER/$filename.md" -- --base "presentations/$filename" -o "../$DEST_FOLDER/$filename"
- |
for file in "$SRC_FOLDER"/*.md; do
filename=$(basename "$file" .md)
npm run build "$SRC_FOLDER/$filename.md" -- --base "$filename" -o "../$DEST_FOLDER/$filename"
done
nginx:start:
cmds:
- docker run --name presentations-nginx -d --rm -v $PWD/dist:/usr/share/nginx/html/presentations:ro -p 8080:80 -d nginx
nginx:stop:
cmds:
- docker stop presentations-nginx || true
docs:build:
env:
DEST_FOLDER: 'dist'
cmds:
- mkdocs build -d $DEST_FOLDER
docs:serve:
cmds:
- mkdocs serve
build:
cmds:
- |
task docs:build
task marp:build
task slidev:build