Comments (8)
Why is it needed for git and vim? Never had an issue before with git.
from projectz.
It's actually a unix thing I just mentioned these tools because that's where for me the newlines are relevant:
- If you open a file in vim and save it (no matter if you modified it or not), it automatically appends a newline (therefore you always have a diff at the end of the file, even if you did not actually change something in the file).
- Git (and github) complain if you remove the newline at the end of the file in a commit, see eg. this commit.
from projectz.
This is like EditorConfig's insert_final_newline = true
.
It shouldn't remove a newline, if one exists. It shouldn't add one, as well, FWIW.
from projectz.
It shouldn't remove a newline, if one exists. It shouldn't add one, as well, FWIW.
Good idea. Will see what we can do. @pflannery do you want to grab this one?
from projectz.
@balupton Im guessing this is just a matter of adding a new line during "Save package files" like data = JSON.stringify(@dataForPackagesEnhanced[name], null, ' ') + '\n'
??
(Shame we cant reference line number to projectz.litcoffee files)
from projectz.
It shouldn't remove a newline, if one exists. It shouldn't add one, as well, FWIW.
I've determined that both npm and bower (init, --save and --save-dev) append an LF to the file so I don't think its worth the extra effort in trying to detect if an LF wasn't present originally. Instead my PR just does what npm and bower do and that's append an LF to the end of the JSON
from projectz.
Instead my PR just does what npm and bower do and that's append an LF to the end of the JSON
Great
from projectz.
Thank you.
from projectz.
Related Issues (20)
- Your .dependabot/config.yml contained invalid details HOT 1
- Thoughts on plugins HOT 2
- add executable instructions within deno instructions
- Better name? HOT 4
- Cloud Service that routinely sends PRs with Projectz updates HOT 2
- backers: fetch from patreon HOT 2
- Document JSPM's `jsnext:main` field HOT 1
- http://balupton.com and https://balupton.com create different users HOT 1
- Fetch Sponsors Automatically HOT 4
- TypeError: Class constructor Fellow cannot be invoked without 'new' HOT 1
- Update backers readme description to note it also does maintainers and contributors
- Block for Table of Contents HOT 1
- Plugin System HOT 3
- Wizardly to UNPKG HOT 1
- listing of the projects that use projectz HOT 1
- Use remark HOT 4
- Greenkeeper as a contributor HOT 3
- Convert from Flow Type to TypeScript HOT 4
- Update Editions Link HOT 1
- (cli): Nothing shows up if no arguments were provided HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from projectz.