Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Removes trailing newline in package.json #21

Closed
mmun opened this issue Aug 20, 2015 · 4 comments
Closed

Removes trailing newline in package.json #21

mmun opened this issue Aug 20, 2015 · 4 comments

Comments

@mmun
Copy link
Contributor

mmun commented Aug 20, 2015

Not that big of a deal, but it would be nice to avoid changing the whitespace, as demonstrated in this commit:

tildeio/htmlbars@a5bb78d

@slindberg
Copy link
Contributor

The problem is that most editors are configured to add trailing newlines on save, since this is better for git diffs in general. And sometimes you just have to edit package.json with an editor. ¯_(ツ)_/¯

This is one of those things I've just given up on. Software amirite?

@mmun
Copy link
Contributor Author

mmun commented Aug 21, 2015

@slindberg That's true. npm install --save some-new-dep also renormalizes the package.json to have a newline at the end (among other things). The problem is that ember-cli-release removes the newline, so you're constantly fighting npm & your editor.

I'll try and find how npm install does its normalization.

@slindberg
Copy link
Contributor

Ahhh, I understand now. Although for some reason I thought that doing an npm install --save ... stripped the newline. Must have been caused by other dev's editors or something.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants