-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package management #12
Comments
Overall, I think I would still vote to use |
I agree that npm is the safest choice. WRT Yarn 1 vs 2 I believe how it works is that if they have the latest Yarn 1 it will detect that the project uses a different Yarn (through We could keep this issue open and see how yarn/ |
@LauraLangdon yeah the two are closely related. I'll have a look at this again next week and try to come up with a proposal for the weekly meeting. |
Docusaurus has existing plugin support for displaying npm/yarn commands automatically as tabs. |
From yesterday's docs meeting notes:
|
As discussed with @callahad, we'll go with an opinionated ™️ approach and opt for
|
I did some digging around package the management system to use for this repo. The motivation here is reducing friction and making it easier to use the build the docs locally and contribute.
npm
is available by default innode.js
, installing thewebsite
dependencies on my computer takes ~10seconds, and 135 MB worth of dependencies are downloaded intonode_modules
.yarn
would normally cause extra trouble to install, but the latest versions of Node.js 14 and onwards makes its installation trivial thanks to corepack. This means that on all supported Node.js versions (v12 is unsupported and the LTS expires on April anyway)yarn
can be enabled by thecorepack enable
command, without further platform-specific installation.With this hurdle out of the way, the question is Yarn (2.0 plus) or Yarn Classic (1.x). Since 1.x is already deprecated I wouldn't add an extra dependency just for this, so I'd argue only modern Yarn should be considered.
Using the latest Yarn stable (3.1.1) the installation time is is around 6 seconds (a nice improvement) and the installed file module cache in the
.yarn
folder clocks in at 53 MB, this is a ~60% reduction compared to npm.Yarn wants to have the module cache committed into the repository. While yarn fares much better in this regard than npm, this would come with a few drawbacks:
Due to the above issues, I cannot recommend checking in yarn's cache into the GitHub repo without further testing, but perhaps using yarn should not be outright dismissed due to its other significant benefits. That said, I would argue that we should choose a single documented and supported method of building the docs and reflect this in the README, to reduce support overhead and complexity for contributions.
The text was updated successfully, but these errors were encountered: