typeorm-model-generator icon indicating copy to clipboard operation
typeorm-model-generator copied to clipboard

Case issue: Index.ts fails on Linux, works on Mac OS

Open queejie opened this issue 5 years ago • 4 comments

I wasn't able to find a flag to generate a lower case index.ts file. When we generate on Mac OS it results in Index.ts (upper case first letter). That fails on production, on Linux. Is it possible to affect the index file name without affecting all the other model file names?

(By 'fails', I mean that all the import statements that reference just entities must be replaced with specific references to entities/EntityName)

Thanks for a great tool!

queejie avatar Apr 22 '20 17:04 queejie

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 01 '20 21:08 stale[bot]

Sorry for the delay I didn't have much time for OSS lately. What do you mean by That fails on production? How does that fail?

Kononnable avatar Aug 02 '20 08:08 Kononnable

When I generate on the Mac dev box, it uses one case, but when I move that code over to Linux it uses another for index.ts/Index.ts. (I can't remember which is which.) Since the Mac is case insensitive it works. Since Linux is not, it fails. By fail I mean that using imports with '/path/entities' does not work, because of the implicit index.ts. I would have to change all imports to '/path/entities/specific-model' to have it work on both platforms.

queejie avatar Aug 02 '20 14:08 queejie

Hello, we have the same problem. I am using linux and the tool generates Index.ts with first character being upper case. My colleagues use different OS so now I have to manually adjust the file name to lowercase after each generation.

scr4bble avatar Aug 12 '22 21:08 scr4bble