Compare commits

..

No commits in common. "384a0bd111e80ee5fdfc7601101027022a8aab7a" and "682d53fb35ce5fb6d9e692281848efc9b4756cfe" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -1,13 +1,13 @@
// Load a project so you can work on it.
import { projects } from "@/project"
import { apps } from "@/webapp"
import { sessionGet, sessionSet } from "@/session"
export default function (project: string) {
const state = sessionGet()
if (!project) throw `usage: load <project name>`
if (state && projects().includes(project)) {
if (state && apps().includes(project)) {
sessionSet("project", project)
sessionSet("cwd", "")
} else {

View File

@ -14,7 +14,7 @@ export default function (project: string) {
if (projects().includes(project)) throw `${project} already exists`
const dir = join(NOSE_DIR, project)
const dir = join(NOSE_DIR, project, "bin")
mkdirSync(dir, { recursive: true })
writeFileSync(join(dir, `index.ts`), `export default (c: Context) =>\n "Hello, world!"`)