Use Deno for speed, package locks in dev setup, github workflows

It's faster than yarn and comes with standard convenience utilities
This commit is contained in:
Debanjum
2025-06-08 19:07:06 -07:00
parent 006b958071
commit d2940de367
4 changed files with 5278 additions and 3 deletions

View File

@@ -40,7 +40,14 @@ if [ "$DEVCONTAINER" = true ]; then
# Install Web App using cached dependencies # Install Web App using cached dependencies
echo "Installing Web App using cached dependencies..." echo "Installing Web App using cached dependencies..."
cd "$PROJECT_ROOT/src/interface/web" cd "$PROJECT_ROOT/src/interface/web"
yarn install --cache-folder /opt/yarn-cache && yarn export if command -v deno &> /dev/null
then
echo "using Deno."
deno install && deno run ciexport
else
echo "using Yarn."
yarn install && yarn ciexport
fi
else else
# Standard setup # Standard setup
echo "Installing Server App..." echo "Installing Server App..."
@@ -56,7 +63,14 @@ else
echo "Installing Web App..." echo "Installing Web App..."
cd "$PROJECT_ROOT/src/interface/web" cd "$PROJECT_ROOT/src/interface/web"
yarn install && yarn export if command -v deno &> /dev/null
then
echo "using Deno."
deno install && deno run export
else
echo "using Yarn."
yarn install && yarn export
fi
fi fi
# Install Obsidian App # Install Obsidian App

View File

@@ -0,0 +1,10 @@
{
"tasks": {
"hook": "deno run --allow-read --allow-run --allow-write https://deno.land/x/deno_hooks@0.1.1/mod.ts"
},
"fmt": {
"indentWidth": 4,
"lineWidth": 100,
"proseWrap": "preserve"
}
}

5251
src/interface/web/deno.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint", "lint": "deno fmt",
"collectstatic": "bash -c 'pushd ../../../ && source .venv/bin/activate && python3 src/khoj/manage.py collectstatic --noinput && deactivate && popd'", "collectstatic": "bash -c 'pushd ../../../ && source .venv/bin/activate && python3 src/khoj/manage.py collectstatic --noinput && deactivate && popd'",
"cicollectstatic": "bash -c 'pushd ../../../ && python3 src/khoj/manage.py collectstatic --noinput && popd'", "cicollectstatic": "bash -c 'pushd ../../../ && python3 src/khoj/manage.py collectstatic --noinput && popd'",
"export": "yarn build && cp -r out/ ../../khoj/interface/built && yarn collectstatic", "export": "yarn build && cp -r out/ ../../khoj/interface/built && yarn collectstatic",