Compare commits
3 Commits
8075facfa3
...
a67b04ba51
| Author | SHA1 | Date | |
|---|---|---|---|
| a67b04ba51 | |||
| 9e6e64cb0e | |||
| 37d2d9d700 |
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
bun run check || exit 1
|
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
20
bin/rmproject.ts
Normal 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`
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
////
|
////
|
||||||
// version: 178711c
|
// version: 8075fac
|
||||||
|
|
||||||
// src/js/dom.ts
|
// src/js/dom.ts
|
||||||
var content2 = $("content");
|
var content2 = $("content");
|
||||||
|
|
@ -741,7 +741,7 @@ function handleCompletion(e) {
|
||||||
const input = cmdInput.value;
|
const input = cmdInput.value;
|
||||||
for (const command of Object.keys(commands)) {
|
for (const command of Object.keys(commands)) {
|
||||||
if (command.startsWith(input)) {
|
if (command.startsWith(input)) {
|
||||||
cmdInput.value = command;
|
cmdInput.value = command + " ";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ function handleCompletion(e: KeyboardEvent) {
|
||||||
|
|
||||||
for (const command of Object.keys(commands)) {
|
for (const command of Object.keys(commands)) {
|
||||||
if (command.startsWith(input)) {
|
if (command.startsWith(input)) {
|
||||||
cmdInput.value = command
|
cmdInput.value = command + " "
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user