-
Notifications
You must be signed in to change notification settings - Fork 340
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
Package.json is being modified after cordova build android #394
Comments
Affecting iOS too |
Still exists on CLI 9.0.0. |
Yep, this won't be fixed until we do a complete refactor of our package.json handling. The first part of that is apache/cordova-common#34 which needs a lot more work before it's ready to merge |
AFAICT, this is a duplicate of #353. Someone please yell at me if that's not right. Closing for now. |
I created a plugin to solve this issue. |
Plugin from @arzyu did the trick Now I don't need to battle with diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -95,4 +95,4 @@
}
}
-}
+}
\ No newline at end of file
|
How about config.xml? Do the plugin handle that aswell? |
Description:
I work in a windows environment with vscode where all files need to end with
CRLF
, so this configs are made:.editorconfig
theend_of_line
property is set tocrlf
git
uses crlf.prettierrc
has"endOfLine": "crlf"
"files.eol": "\r\n"
and"prettier.endOfLine": "crlf"
All work as expected except for when you build (or run) the project on device.
> cordova build android
thepackage.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:
package.json
has a empty new line in the end.cordova build android
Output:
I had this problem with cordova version 8.0.0 and right now with 8.1.2
Edit: As per this comment, this problem also happens in iOS
The text was updated successfully, but these errors were encountered: