ionic-team / ionic-team/ionic-cli

Package.json is being modified after ionic cordova build android

Đang mở
#3,803 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Description:**

I work in a windows environment with vscode where all files need to end with `CRLF `, so this configs are made:

* `.editorconfig` the `end_of_line` property is set to `crlf`
* `git` uses crlf
* `.prettierrc` has `"endOfLine": "crlf"`
* vscode config has `"files.eol": "\r\n"` and `"prettier.endOfLine": "crlf"`

All work as expected except for when you build (or run) the project on device. Just after lint is complete and `ionic-cli` prints `> cordova build android` the `package.json` file is edited and stripped from the last empty line. That leads git say changes where made and the tree is not clean.

**Steps to Reproduce:**
* Make a new Ionic project
* Set eol to crlf
* Add platform Android
* Make sure `package.json` has a empty new line in the end.
* Run `ionic cordova build android`

**Output:**
![image](https://user-images.githubusercontent.com/5490201/50472339-b2ce2e80-09b8-11e9-885d-4ba4300f629a.png)

**My `ionic info`:**
```
Ionic:

ionic (Ionic CLI) : 4.6.0 (C:\Users\myUser\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : not installed
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 22 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\myUser\AppData\Local\Android\sdk)
NodeJS : v10.14.1 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 10
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.