diff --git a/files/.yarnrc.yml b/files/.yarnrc.yml new file mode 100644 index 00000000..8b757b29 --- /dev/null +++ b/files/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules \ No newline at end of file diff --git a/files/gitignore b/files/gitignore index dbe5764f..70c9418f 100644 --- a/files/gitignore +++ b/files/gitignore @@ -19,3 +19,14 @@ yarn-error.log /package-lock.json.ember-try /yarn.lock.ember-try /pnpm-lock.ember-try.yaml + +<% if (yarn) { %> +# https://yarnpkg.com/getting-started/qa/#which-files-should-be-gitignored +.yarn/* +!.yarn/cache +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions +<% } %> \ No newline at end of file diff --git a/index.js b/index.js index 6234e7b5..470564c3 100644 --- a/index.js +++ b/index.js @@ -323,6 +323,12 @@ module.exports = { files = files.filter((filename) => !filename.endsWith('.npmrc')); } + if (!this.yarn) { + let ignoredFiles = ['.yarnrc.yml']; + + files = files.filter(filename => !ignoredFiles.includes(filename)); + } + return files; },