The file is stored in the repo but I can't "import" it because its not a typescript file, and its not stored locally unless its imported... How can I read it at runtime?
Perhaps the version should be a .ts file? Maybe you could generate this?
// VERSION.ts
export const VERSION = "1.0.0"
I can't think of why a simple text file would be more useful than this. In the version script instead of reading the file you could then import it with const { VERSION } = import('./VERSION.ts'). I don't think you even need the --allow-read flag for that, I'm not sure though.
The file is stored in the repo but I can't "import" it because its not a typescript file, and its not stored locally unless its imported... How can I read it at runtime?
Perhaps the version should be a .ts file? Maybe you could generate this?
I can't think of why a simple text file would be more useful than this. In the version script instead of reading the file you could then import it with
const { VERSION } = import('./VERSION.ts'). I don't think you even need the--allow-readflag for that, I'm not sure though.