mirror of
https://github.com/BillyOutlast/posthog.com.git
synced 2026-02-04 03:11:21 +01:00
* add 'plugins/*' as workspaces in package.json Adding local plugin directories as workspaces means their deps will automatically be installed * chore: add yarn v2 dependency ignores * create gatsby-plugin-git-info This local plugin is a fork I created of gatsby-transformer-gitinfo, which was originally used but suffered from serious performance issues. On every call to onCreateNode, the library would completely reindex the entire git repo in order to retrieve the latest commit for a single file. This new plugin instead performs everything during the onPreInit stage. It first matches all markdown files (as these are currently the only ones which need to display a 'Last updated' tooltip) and then caches the latest commit for each file. Then, at build time it simply retrieves this info with a lookup. On my machine I saw a significant speedup on the 'source and transform nodes' stage, going from taking +120s to now only taking ~40s! * deps: remove gatsby-transformer-gitinfo and regen lockfile * change package to private In yarn classic workspaces are only allowed in private packages. Even though the posthog.com repo is public, it shouldn't matter setting the package to private as we don't publish it as a standalone package * add versions to plugins and revert to v1 lockfile Yarn will ignore a workspace if it doesn't have a version. This commit also reverts back to using yarn classic to generate the lockfile.