-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·41 lines (31 loc) · 1005 Bytes
/
run
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
#!/usr/bin/env sh
# dx build --features web --release
# dx build --features web --release
# Remove sass
pkill -9 -f sass
# Check if 'sass' command is available in the environment
if which sass &> /dev/null; then
if sass --help | grep -q "Dart"; then
sass --no-source-map --watch src:public/style &
else
echo "Dart is not supported by Sass."
sass --sourcemap=none --watch src:public/style &
fi
else
echo "Sass is not installed."
exit 1;
fi
# cargo run --features ssr --release &
dx serve &
while true; do
# Use inotifywait to monitor file changes recursively
inotifywait -m ./src -e create -e moved_to --include '.*\.scss$' |
while read -r directory action file; do
pkill -f "sass"
sass --no-source-map --watch src:public/style &
# cargo run --features ssr &
done
# # When any file changes, relaunch the command
# echo "File changed. Relaunching command..."
# cargo run --features ssr --release
done