Compare commits

..

3 Commits

Author SHA1 Message Date
a67b04ba51 rmproject 2025-10-07 20:54:26 -07:00
9e6e64cb0e always add bundle.js 2025-10-07 20:49:35 -07:00
37d2d9d700 in case they have args 2025-10-07 20:48:40 -07:00
4 changed files with 25 additions and 4 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh
bun run check || exit 1
bun run build || exit 1
bun run build || exit 1
git add ./public/bundle.js

20
bin/rmproject.ts Normal file
View File

@ -0,0 +1,20 @@
// Remove a project. Careful! There's no undo.
import { rmdirSync } from "fs"
import { DEFAULT_PROJECT } from "@/config"
import { projectDir, projects, projectName } from "@/project"
import load from "./load"
export default function (project: string, confirm = false) {
if (!projects().includes(project)) throw `no ${project} project`
if (project === DEFAULT_PROJECT) throw `can't delete ${DEFAULT_PROJECT} project`
if (!confirm) throw `> Are you POSITIVE?\n> Run again with 'true' at the end:\n\n$ rmproject ${project} true`
const isCurrent = projectName() === project
rmdirSync(projectDir(project), { recursive: true })
if (isCurrent)
return `${project} deleted`
}

View File

@ -1,5 +1,5 @@
////
// version: 178711c
// version: 8075fac
// src/js/dom.ts
var content2 = $("content");
@ -741,7 +741,7 @@ function handleCompletion(e) {
const input = cmdInput.value;
for (const command of Object.keys(commands)) {
if (command.startsWith(input)) {
cmdInput.value = command;
cmdInput.value = command + " ";
return;
}
}

View File

@ -16,7 +16,7 @@ function handleCompletion(e: KeyboardEvent) {
for (const command of Object.keys(commands)) {
if (command.startsWith(input)) {
cmdInput.value = command
cmdInput.value = command + " "
return
}
}