[
https://issues.apache.org/jira/browse/CB-12766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011948#comment-16011948
]
ASF GitHub Bot commented on CB-12766:
-------------------------------------
GitHub user remcohaszing opened a pull request:
https://github.com/apache/cordova-lib/pull/558
CB-12766 Consistently write JSON with 2 spaces indentation
### Platforms affected
None really.
### What does this PR do?
JSON was written with 4 spaces indentation and even a tab at some
point. Most NodeJS tools write their JSON configuration with an
indentation of 2 spaces. Most notably npm does this, which writes to
package.json, as does Cordova. This caused unnecessary changes in
package.json.
### What testing has been done on this change?
None, this is mostly stylistic.
### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html)
in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform
affected.
- [x] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/remcohaszing/cordova-lib master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-lib/pull/558.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #558
----
commit 7431e36fee775f0383ad3c3dae396a2a95c4bc05
Author: Remco Haszing <[email protected]>
Date: 2017-05-16T07:58:54Z
CB-12766 Consistently write JSON with 2 spaces indentation
JSON was written with 4 spaces indentation and even a tab at some
point. Most NodeJS tools write their JSON configuration with an
indentation of 2 spaces. Most notably npm does this, which writes to
package.json, as does Cordova. This caused unnecessary changes in
package.json.
----
> Cordova CLI changes package.json indentation
> --------------------------------------------
>
> Key: CB-12766
> URL: https://issues.apache.org/jira/browse/CB-12766
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-cli, cordova-lib
> Affects Versions: 7.0.0
> Reporter: Remco Haszing
> Assignee: Kerri Shotts
> Priority: Minor
> Labels: easy-fix
>
> While Cordova is busy adding platforms / plugins, it writes to package.json
> several times. In this process the indentation of package.json alternates
> between 2 and 4 spaces. The final result is an indentation of 4 spaces, which
> conflicts with the indentation of 2 spaces that npm uses.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]