-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
38 lines (33 loc) · 791 Bytes
/
Rakefile
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
# Setup:
#
# git checkout --orphan gh-pages
# git commit -m ok --allow-empty
# git push --set-upstream origin gh-pages
# git checkout master
#
# (rm -rf public)
# (git worktree prune)
# git worktree add -B gh-pages public origin/gh-pages
task :default do
system 'cargo build --release'
system 'wasm-pack build'
Dir.chdir 'www' do
system 'rm dist/*'
system 'pnpm install'
system 'pnpm run build'
end
end
# does it work from rake or only manual?
task :shtuff do
Dir.chdir 'public' do
system 'rm *'
system 'cp ../www/dist/* .'
system 'git add --all && git commit -m "pub" && git push'
end
end
task :dev do
sh 'watchexec -r -e rs,toml -- rake dev_one'
end
task :dev_one do
sh 'cargo build; wasm-pack build; cd www; pnpm install; pnpm run start'
end