✨ build: use pnpm + shell scripts to build project
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
outdir="${1:-./build}"
|
||||
|
||||
mkdir -p $outdir
|
||||
|
||||
cp -rf node_modules src/
|
||||
ags bundle src/app.ts $outdir/colorshell
|
||||
rm -rf src/node_modules
|
||||
@@ -0,0 +1,12 @@
|
||||
file="${1:-./build/colorshell}"
|
||||
|
||||
function start() {
|
||||
exec "$file"
|
||||
}
|
||||
|
||||
if [[ -f "$file" ]]; then
|
||||
start
|
||||
else
|
||||
pnpm build
|
||||
start
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
if [[ -d "@types" ]] && [[ ! "$1" == "-f" ]]; then
|
||||
echo "Types skipped(already built). To force-build, run \`types\`"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
echo "Building types, this can take long..."
|
||||
pnpx @ts-for-gir/cli generate --ignoreVersionConflicts -o ./src/@girs
|
||||
Reference in New Issue
Block a user