-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
chore: use linefix to ensure platform line endings #135
Conversation
Use lec so that when developing changes the results of npm run prepare always have unix line endings so git diff commands don't show line ending changes for the ncc generated files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very good idea, but isn’t there a way in ncc
to tell it to create reproducible builds regardless of OS? I would even like to get rid of ncc
altogether as it feels like a huge cludge just to get actions going. Maybe using something like rollup instead might be able to create vastly better bundles and even properly bundle-split the common code.
As I often maintain this on windows, looking at git diff
output is a huge pain sometimes.
package-lock.json
Outdated
"resolved": "https://registry.npmjs.org/lec/-/lec-1.0.1.tgz", | ||
"integrity": "sha512-3pIFvYBrdpfMK2cxP4xRBOrM56x1A1SykesXJ1I8/b6sUWvPYhM8p/1jIig0kRrmaKhW9c182GRgNOwwUh3i3A==", | ||
"dependencies": { | ||
"coffee-script": "^1.10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uff, jesus… I srsly don’t want to pull in coffeescript of all things for something as trivial as this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it doesn't seem like ncc has any options there, seems to be hard coded to windows line endings which is odd. There's an open issue about line endings which doesn't look like it's going to be fixed.
Ahh yes, that's a bit heavy isn't it :(
I'll see if there's something lighter, thanks for the consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linefix seems to do the trick and has zero dependencies.
Replace lec with linefix which is much lighter weight having no external dependencies.
Use linefix so that when developing changes the results of
npm run prepare
always have unix line endings sogit diff
commands don't show line ending changes for thencc
generated files.