Support for Windows line endings
See original GitHub issueBug Report or Feature Request (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Versions.
$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.0.6
node: 6.10.2
os: win32 x64
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.0.6
@angular/compiler-cli: 4.1.3
Running on Windows 10.
Repro steps.
$ ng new demo
$ cd demo
$ ng generate component DemoComponent
$ git add .
warning: LF will be replaced by CRLF in src/app/app.module.ts.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/app/demo-component/demo-component.component.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/app/demo-component/demo-component.component.spec.ts.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/app/demo-component/demo-component.component.ts.
The file will have its original line endings in your working directory.
The log given by the failure.
None.
Desired functionality.
I’d like a setting to make ng generate create files with Windows line endings (CRLF) instead of the currently used Unix line endings (LF). This would increase users flexibility on Windows environments, where it’s still common to use Windows line endings as a default.
The setting could look like ng set --global end_of_line=crlf.
Mention any other details that might be useful.
None.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Introducing extended line endings support in Notepad
Starting with the current Windows 10 Insider build, Notepad will support Unix/Linux line endings (LF), Macintosh line endings (CR), and Windows ...
Read more >Configuring Git to handle line endings - GitHub Docs
You can configure Git to handle line endings automatically so you can collaborate effectively with people who use different operating systems. Global settings ......
Read more >Converting from Windows-style to UNIX-style line endings
All versions of Microsoft Windows represent line endings as CR followed by LF. ... go to the Edit menu, select the "EOL Conversion"...
Read more >DOS vs. Unix Line Endings
Text files created on DOS/Windows machines have different line endings than files created on Unix/Linux. DOS uses carriage return and line feed ("\r\n")...
Read more >Fixing misaligned Linux and Windows line endings
Windows and Linux line endings don't match, which causes trouble if you're moving files from a Windows desktop to a Linux container.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can use this tslint rule (https://palantir.github.io/tslint/rules/linebreak-style/) and use
ng lint --fix. In the upcoming version 1.1, you’ll be able to use the new--lint-fixoption on thegeneratecommand or add it as a default in.angular-cli.json.This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.