typed-ember / glint

TypeScript powered tooling for Glimmer templates
https://typed-ember.gitbook.io/glint
MIT License
109 stars 51 forks source link

Fix `glint --build --clean` (broken since Volar) #768

Open machty opened 5 days ago

machty commented 5 days ago

Fix glint --build --clean specs (broken since Volar -- cleans everything but .gts file outputs). Johnson thinks it can be supported, needs upstream fix.

Discord Thread

Reproduction

  1. Clone glint repo
  2. Run yarn / tsc commands
  3. cd test-packages/ts-template-imports-app
  4. run ../../packages/core/bin/glint.js --declaration --emitDeclarationOnly

The following files will show up:

        src/Greeting.gts.d.ts
        src/Greeting.gts.d.ts.map
        src/GreetingUntyped.gjs.d.ts
        src/GreetingUntyped.gjs.d.ts.map
        src/NoTemplate.gts.d.ts
        src/NoTemplate.gts.d.ts.map
        src/Playground.gts.d.ts
        src/Playground.gts.d.ts.map
        src/index.gts.d.ts
        src/index.gts.d.ts.map
        src/normal.d.ts
        src/normal.d.ts.map
        src/other.d.ts
        src/other.d.ts.map
  1. Attempt to clean these files: ../../packages/core/bin/glint.js --build --clean

All output files from a source .ts file are cleaned up, and the .map files for .gts source files are cleaned up, but .gts.d.ts files remain:

    src/Greeting.gts.d.ts
    src/GreetingUntyped.gjs.d.ts
    src/NoTemplate.gts.d.ts
    src/Playground.gts.d.ts
    src/index.gts.d.ts

These should be removed too.

Need to discuss with Johnson the current state/expectations for how to handle this. Also curious why Vue doesn't run into this.