-
Notifications
You must be signed in to change notification settings - Fork 685
Dependency Management
PWA Studio is a "monorepo" managed using Yarn workspaces.
It contains several NPM packages in its packages/
folder, each with a package.json
file, and the root directory contains a package.json
file which stores mutual dependencies of the child packages.
Running yarn install
from the root will install, hoist, and dedupe the dependencies listed in each workspace's package.json
file, plus any dependencies listed in the root package.json
file.
Workspaces also simplify our package scripts:
Command | Effect |
---|---|
yarn workspaces run clean |
run the clean script within each package |
yarn workspace @magento/venia-concept run watch |
run the watch script within packages/venia-concept
|
Many libraries in PWA Studio are used only for testing, linting, or debugging, such as the jest
test framework. When writing a test or adding a lint rule, you may need to install additional libraries.
An NPM "peer dependency" allows the consumer of a package to control the version of a shared dependency more precisely, and is commonly used when making plugins. Both @magento/pwa-buildpack
and @magento/upward-js
contain plugins for other libraries, so they list those libraries as peerDependencies
which must be installed alongside them.
- Sync calls:
- Check the calendar
- Recordings - https://goo.gl/2uWUhX
- Slack: #pwa Join #pwa
- Contributing
- Product