diff --git a/.gitattributes b/.gitattributes index 176a458f9..6313b56c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=auto +* text=auto eol=lf diff --git a/packages/cna-template/template/_.gitattributes b/packages/cna-template/template/_.gitattributes new file mode 100644 index 000000000..6313b56c5 --- /dev/null +++ b/packages/cna-template/template/_.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/packages/create-nuxt-app/lib/saofile.js b/packages/create-nuxt-app/lib/saofile.js index 62945b5d7..dd77c6b7b 100644 --- a/packages/create-nuxt-app/lib/saofile.js +++ b/packages/create-nuxt-app/lib/saofile.js @@ -103,6 +103,7 @@ module.exports = { files: '*', filters: { '_.eslintrc.js': 'linter.includes("eslint")', + '_.gitattributes': 'vcs.includes("git")', '_.prettierignore': 'linter.includes("prettier")', '_.prettierrc': 'linter.includes("prettier")', '_jsconfig.json': 'devTools.includes("jsconfig.json")', @@ -123,6 +124,7 @@ module.exports = { '_.prettierignore': '.prettierignore', '_.prettierrc': '.prettierrc', '_.eslintrc.js': '.eslintrc.js', + '_.gitattributes': '.gitattributes', '_jsconfig.json': 'jsconfig.json', '_stylelint.config.js': 'stylelint.config.js', '_commitlint.config.js': 'commitlint.config.js', diff --git a/packages/create-nuxt-app/test/snapshots/index.test.js.md b/packages/create-nuxt-app/test/snapshots/index.test.js.md index d078f2576..01b1e6c93 100644 --- a/packages/create-nuxt-app/test/snapshots/index.test.js.md +++ b/packages/create-nuxt-app/test/snapshots/index.test.js.md @@ -10,6 +10,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -92,6 +93,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -174,6 +176,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -262,6 +265,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -344,6 +348,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -426,6 +431,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -508,6 +514,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -594,6 +601,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -680,6 +688,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -766,6 +775,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'assets/buefy.png', @@ -855,6 +865,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -944,6 +955,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1031,6 +1043,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'assets/oruga.png', @@ -1117,6 +1130,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1207,6 +1221,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1291,6 +1306,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1378,6 +1394,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1464,6 +1481,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1550,6 +1568,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1636,6 +1655,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'assets/variables.scss', @@ -1752,6 +1772,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1858,6 +1879,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -1949,6 +1971,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2039,6 +2062,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2129,6 +2153,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', '.eslintrc.js', + '.gitattributes', '.gitignore', '.husky/commit-msg', '.husky/common.sh', @@ -2253,6 +2278,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', '.eslintrc.js', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2347,6 +2373,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', '.prettierignore', '.prettierrc', @@ -2437,6 +2464,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2524,6 +2552,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2618,6 +2647,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', '.husky/commit-msg', '.husky/common.sh', @@ -2708,6 +2738,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2791,6 +2822,7 @@ Generated by [AVA](https://avajs.dev). [ '.babelrc', '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -2883,6 +2915,7 @@ Generated by [AVA](https://avajs.dev). [ '.babelrc', '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'ava.config.cjs', @@ -2982,6 +3015,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3076,6 +3110,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3166,6 +3201,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3248,6 +3284,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3333,6 +3370,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3415,6 +3453,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3500,6 +3539,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.github/dependabot.yml', '.github/semantic.yml', '.gitignore', @@ -3585,6 +3625,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3668,6 +3709,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.github/semantic.yml', '.gitignore', 'README.md', @@ -3751,6 +3793,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.github/dependabot.yml', '.gitignore', 'README.md', @@ -3834,6 +3877,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3916,6 +3960,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -3998,6 +4043,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -4080,6 +4126,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', @@ -4162,6 +4209,7 @@ Generated by [AVA](https://avajs.dev). [ '.editorconfig', + '.gitattributes', '.gitignore', 'README.md', 'components/NuxtLogo.vue', diff --git a/packages/create-nuxt-app/test/snapshots/index.test.js.snap b/packages/create-nuxt-app/test/snapshots/index.test.js.snap index b86d39916..aa975701e 100644 Binary files a/packages/create-nuxt-app/test/snapshots/index.test.js.snap and b/packages/create-nuxt-app/test/snapshots/index.test.js.snap differ