scrap.ts 460 B

123456789101112131415161718
  1. import { App } from "../../app/app"
  2. import { LSP } from "../../lsp"
  3. import { cmd } from "./cmd"
  4. export const ScrapCommand = cmd({
  5. command: "scrap <file>",
  6. builder: (yargs) =>
  7. yargs.positional("file", { type: "string", demandOption: true }),
  8. async handler(args) {
  9. await App.provide(
  10. { cwd: process.cwd() },
  11. async () => {
  12. await LSP.touchFile(args.file, true)
  13. console.log(await LSP.diagnostics())
  14. },
  15. )
  16. },
  17. })