Skip to content

Commit 3c0df25

Browse files
committed
fix: add .gitattributes to help with line endings, reducing Windows issues
As recommended by Prettier. Fixes #39
1 parent 3fbbc46 commit 3c0df25

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: index.js

+8
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ export default function createConfig({
125125
)
126126
}
127127

128+
if (styleGuide !== 'standard' || needsPrettier) {
129+
// TODO:
130+
// I used renderEjsFile instead of readFileSync for simplicity and easier integration
131+
// with create-vue. But it's ugly.
132+
// Should refactor later, or move this project into create-vue.
133+
files['.gitattributes'] = renderEjsFile('./templates/_gitattributes', {})
134+
}
135+
128136
return {
129137
pkg,
130138
files,

Diff for: templates/_gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

0 commit comments

Comments
 (0)