Open frencojobs opened 3 years ago
I didn't want their dependencies filling up the main repo, as they're pretty optional, there's lot of deps, they could clash and will get out of date pretty quickly.
I think we could have a second package.json in the examples dir which has all of them? though theat doesn't solve the linking problem realistically
Yea makes sense, but we can technically use pnpm i --filter=!examples
to install deps to the packages only. pnpm i --filter=!packages --frozen-lockfile
to install deps for examples. Then the lock file is clear & also since it's pnpm, the repeated deps in examples are not gonna be installed again and again, right?
We just have to add them as scripts to package.json
and make sure other ppl know about it in CONTRIBUTING.md
.
Update: Nope. Nevermind. --frozen-lockfile
only works when the deps are already in the current lockfile.
I've switched Docusaurus to use link:/../
in the package.json - this. means you do not need to yarn upgrade
to get the latest build. Worked pretty well for #79
Oo sweet. I didn't know link:
exists and have been manually linking the examples with packages.
@orta I was about to make a PR with that, but then I wanted to make sure first. Is there any specific reason why you didn't use pnpm for examples? I mean you could include the examples in the workspace and it'll be much better right? Now since you have to use yarn, you have to rm node_modules and install dependencies again in the example folders if you want to check an updated state.
If you don't want to install them together with the packages, or you don't want them with build and bootstrap scripts, you could technically filter them out in pnpm right?