learningequality / kolibri-design-system

Kolibri Design System

Home Page:https://design-system.learningequality.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improve dependency management

indirectlylit opened this issue · comments

Currently we have a situation where there is one top-level package.json file, and:

  1. some dependencies used by the shared component library (/lib) are in dependencies
  2. other dependencies used by the shared component library (/lib) are expected/assumed to be provided by the library user
  3. all other design system dependencies are in devDependencies. This includes both build and run-time dependencies

This situation will be hard to maintain. Preferably, we want:

  • Depending on the shared component library be fast and easy:
    • install only the dependencies needed in node_modules
    • support tree shaking in webpack
    • handle situation where dependencies may already be provided by the user (perhaps using peerDependencies?)
  • When managing design system dependencies, we should be able to distinguish between run-time and build dependencies.
  • While using sub-packages might be a good strategy, we've also encountered many developer ergonomics problems with both Lerna and yarn workspaces, so we should approach this strategy with caution