Package Reorganization #4737
Labels
P2
Should do soon
Type: Infrastructure
Changes impacting testing infrastructure or build tooling
Type: Task
Tasks which do not involve engineering
Task Description
Our current repository structure has organically grown over the past year to a point where we have multiple different "packages" spread across different folders. Some of them are pretty self-contained and could be easily published standalone (e.g. all the Karma packages), others are a bit more intertwined with other packages. Some are used for build tooling, others for the WordPress integration or the actual editor.
At the same time, they all share the same
package.json
file, making it difficult to know which packages actually use a certain dependency. That's why I propose adopting npm workspaces using the newly released npm v7 version.This would make maintenance a lot easier.
To get there we need to get our directory structure in shape to make working with our "packages" more straightforward.
Packages
I propose making
/packages
the root for all our packages, containing the following directories (incomplete list):animation
commander
dashboard
date
design-system
story-editor
fonts
i18n
templates
text-sets
tracking
jest-amp
jest-puppeteer-amp
jest-amp
)karma-cuj-reporter
/karma
) - Our custom Karma CUJ reporterkarma-failed-tests-reporter
/karma
) - Our custom Karma reporter to retry failed testskarma-fixture
/assets/src
) - Fixtures to use in Karma testskarma-puppeteer-client
/karma
) - Our custom Karma <-> Puppeteer clientkarma-puppeteer-launcher
/karma
) - Our custom Karma <-> Puppeteer launcheractivation-notice
e2e-test-utils
e2e-tests
story-embed-block
More can be added as identified
Anatomy of a package
Each package has its own README and and package-specific config files.
The repository root contains base config files that can be shared with packages.
The text was updated successfully, but these errors were encountered: