creditkarma / thrift-typescript

Generate TypeScript from Thrift IDL files
Apache License 2.0
155 stars 32 forks source link

When generating code on windows, generated import paths uses Windows path separators #169

Open mthurlin opened 5 years ago

mthurlin commented 5 years ago

When generating code on Windows, import paths ends up with Windows path separators: import * as com_foo_core_thrift from "./..\\..\\..\\..\\core\\thrift";.

This works in Windows, but breaks for anyone trying to run the code somewhere else.

If it was normalized to import * as com_foo_core_thrift from "./../../../../core/thrift"; it would work everywhere.

I guess this is the culprit: https://github.com/creditkarma/thrift-typescript/blob/master/src/main/render/shared/includes.ts#L223-L231