Deck.GL and Lerna - publishing multiple modules (monorepos)

Introduction

Deck.gl repository is a collection of multiple npm packages. Each of the folder in the repository is an npm package

https://github.com/uber/deck.gl/tree/master/modules

How does Deck.GL manage multiple packages?

Deck.gl uses Lerna to maintain and update multiple packages. You can find the lerna config file https://github.com/uber/deck.gl/blob/master/lerna.json

{
  "lerna": "2.0.0",
  "version": "7.1.0-beta.1",
  "npmClient": "yarn",
  "useWorkspaces": true,
  "packages": [
    "modules/*"
  ],
  "command": {
    "publish": {},
    "bootstrap": {}
  }
}

The "modules" folder is specified as "packages". It means that npm packages are present in the modules folder in deck.gl repository. If you open any folder in the "modules" folder, you will see a package.json file. Following are the modules published from Deck.GL repository

Folder NPM Package
aggregation-layers @deck.gl/aggregation-layers
core @deck.gl/core
geo-layers @deck.gl/geo-layers
google-maps @deck.gl/google-maps
json @deck.gl/json
jupyter-widget @deck.gl/jupyter-widget
layers @deck.gl/layers
main deck.gl
mapbox @deck.gl/mapbox
mesh-layers @deck.gl/mesh-layers
react @deck.gl/react
test-utils @deck.gl/test-utils