ember-cli / ember-cli/ember-router-generator

`ember g route my-route` always turns the router.js file into `crlf` mode

Open
#130 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Output from `ember version --verbose && npm --version && yarn --version`:
```
ember-cli: 3.13.2
http_parser: 2.8.0
node: 8.11.3
v8: 6.2.414.54
uv: 1.19.1
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2o
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c
os: win32 x64
6.5.0
bash: yarn: command not found
```

I am able to recreate the bug from the following:

0.) open Git Bash

1.) `Ember new testbug`

2.) `cd testbug/app`

3.) check the newline character type (should all be set to UNIX)

`find . -not \( -path './.git' -prune \) -type f -print0 | xargs -0 dos2unix -ih`

---

```
DOS UNIX MAC BOM TXTBIN FILE
0 14 0 no_bom text ./app.js
0 0 0 no_bom text ./components/.gitkeep
0 0 0 no_bom text ./controllers/.gitkeep
0 0 0 no_bom text ./helpers/.gitkeep
0 25 0 no_bom text ./index.html
0 0 0 no_bom text ./models/.gitkeep
0 3 0 no_bom text ./resolver.js
0 12 0 no_bom text ./router.js
0 0 0 no_bom text ./routes/.gitkeep
0 0 0 no_bom text ./styles/app.css
0 4 0 no_bom text ./templates/application.hbs
0 0 0 no_bom text ./templates/components/.gitkeep
```

4.) `ember g route test-route`

5.) `find . -not \( -path './.git' -prune \) -type f -print0 | xargs -0 dos2unix -ih`

---
```
DOS UNIX MAC BOM TXTBIN FILE
0 14 0 no_bom text ./app.js
0 0 0 no_bom text ./components/.gitkeep
0 0 0 no_bom text ./controllers/.gitkeep
0 0 0 no_bom text ./helpers/.gitkeep
0 25 0 no_bom text ./index.html
0 0 0 no_bom text ./models/.gitkeep
0 3 0 no_bom text ./resolver.js
13 0 0 no_bom text ./router.js
0 0 0 no_bom text ./routes/.gitkeep
0 4 0 no_bom text ./routes/test-route.js
0 0 0 no_bom text ./styles/app.css
0 4 0 no_bom text ./templates/application.hbs
0 0 0 no_bom text ./templates/components/.gitkeep
0 0 0 no_bom text ./templates/test-route.hbs
```

The router.js file has mysteriously converted into CRLF format.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.