Skip to content
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

Add a .gitattributes file to avoid problems with diffs in windows #18

Merged
merged 1 commit into from Sep 6, 2020

Conversation

miguelangeltorresfp
Copy link
Contributor

@miguelangeltorresfp miguelangeltorresfp commented Sep 6, 2020

This is my first pull request ever !

This is the link to this file in the material-ui repo: link

The official doc:
link

Anyway I just detected other incompatibilities with the Windows system in the package.json file:

  • For inline declaration of env variables it would have to use the cross-env package:
    "compile:esm": "cross-env BABEL_ENV=esm npm run compile -- --out-dir dist/esm",

  • And the rsync command is not compatible either.

@alex996
Copy link
Owner

alex996 commented Sep 6, 2020

Thanks for your contribution and congrats on the first PR!

Looks like you nailed it by setting both text and eol. This is recommended by prettier since they switched from auto to lf in v2.0.0 as the default line ending, and is confirmed by repos like gatsbyjs/gatsby. I noticed facebook/react uses * text=auto but that's likely because they're still on prettier v1.19.1.

As far as other incompat, all are valid points. Right off the bat, the following can be improved:

  • rm -rf => rimraf
  • BABEL_ENV=esm => cross-env BABEL_ENV=esm (like you pointed out)
  • rsync => cpx (mysticatea/cpx or something similar)
  • "eslint '**/*.{js,ts,tsx}'" => "eslint \"**/*.{js,ts,tsx}\""

Not too worried though since I'm always on Linux when publishing, but I'd welcome any PRs.

@alex996 alex996 merged commit 8ed4c7a into alex996:master Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants