📦 build(scripts): make start script to only do it's supposed work, add clean script
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
builddir="${1:-./build}"
|
||||||
|
|
||||||
|
echo "[info] cleaning build dir: \"$builddir\""
|
||||||
|
rm -r "$builddir"
|
||||||
+4
-3
@@ -20,9 +20,10 @@ function start() {
|
|||||||
exec "$file"
|
exec "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -f "$file" ]]; then
|
if [[ -f $file ]]; then
|
||||||
start
|
start
|
||||||
else
|
else
|
||||||
pnpm build
|
echo "[error] can't start project: no executable found on default directory"
|
||||||
start
|
echo "[tip] specify the executable path: start \"\$path\""
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user