scrap.ts 493 B

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