Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a configuration option for Unix vs. Windows-style line endings #191

Open
DaRosenberg opened this issue Feb 24, 2024 · 0 comments
Open

Comments

@DaRosenberg
Copy link

We are implementing TypeGen in project developed primarily on macOS and Linux. Our linters, IDEs and Git repolitory are consequently all configured for Unix-style line endings (LF only). However, TypeGen currently seems hard-coded to output TypeScript files with Windows-style line endings (CRLF) even when run on a Unix-based operating system, which causes some difficulty for us.

Would it be possible to add a configuration option for this so we can add something like this to our tgconfig.json file?

{
    "lineEndings": "auto" | "windows" | "unix"
}

Where "windows" would be the default for now, in order to avoid a breaking change (might consider changing the default to "auto" in the next major version), and where "auto" would use System.Environment.NewLine to do what's expected on the current platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant