This PR is a follow up to #7333. It appears that the `.gitignore` file
in the root of the repository is not ignoring the yarn files in the
`/frontend` and `/website` directories.
This PR adds those.
Because the patterns contain slashes, they're interpreted as being
relative to the root directory, as mentioned the description of the
[gitignore format](https://git-scm.com/docs/gitignore#_description) in
the official git docs:
> If there is a separator at the beginning or middle (or both) of the
pattern, then the pattern is relative to the directory level of the
particular .gitignore file itself. Otherwise the pattern may also match
at any level below the .gitignore level.
## About the changes
https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/ introduced
a breaking change in the way they handle files inside package.json which
caused some issues with the way we pack and distribute Unleash:
> npm pack now follows a strict order of operations when applying ignore
rules. If a files array is present in the package.json, then rules in
.gitignore and .npmignore files from the root will be ignored.
What we discovered is that when having a nested .gitignore (the one we
have inside frontend), `npm publish` was taking that nested .gitignore
into account (despite the fact that we also have a package.json with
files inside the same folder). We tricked this by removing the `build`
folder from `frontend/.gitignore` and instead adding it into the root
`.gitignore` which is being ignored by `npm publish` following what's
stated in the release note above.
-----------------
Co-authored-by: Gard Rimestad <gard@getunleash.io>