Win32 - Working Project Opener / Editor

Open dev-project in Script Kit

// Preview: docs
// Menu: Open Project
// Description: Opens a project in vscode
// Shortcut: cmd shift .
import "@johnlindquist/kit";
const envPath = await env('PROJECT_DIR');
const projectDir = home(envPath);
const projects = await readdir(projectDir);
const filteredProjects = projects.filter((v) => v.includes('.') ? false : v)
const project = await arg('Enter a project name:', filteredProjects);
const projectPath = path.resolve(projectDir, project);
edit(projectPath)

Todos

  • [ ] Make it so editor does not create an untitled file