colonyJS is a monorepo. A monorepo is simply a common repository for all npm modules of a certain scope, sharing common modules and development environments. You can learn more about monorepos here.
develop branch is working towards supporting the latest version of the colonyNetwork smart contracts. Fixes and maintenance to support the latest version should be merged into the
master branch supports the glider-rc.1 release of the colonyNetwork smart contracts. Hot fixes to support this release should be merged into the
master branch, which will then be merged into
First, you need to activate yarn workspaces:
yarn config set workspaces-experimental true
Next, you need to install package dependencies:
yarn in the root directory will install all of the required dependencies, including the dependencies within
packages, which will also link interdependencies between
Add a dependency to a local package:
cd packages/[local_package] yarn add [remote_package]
Run a command in all packages:
lerna run [command]
Note: For example, running
lerna run build in the root directory will run the
build script in each subpackage. More information about how this works can be found here.
Publish updated packages to npm:
lerna publish will guide you through the publish process.
Run a command for a single package:
lerna run --scope=@colony/my-package-name [command]
lerna run with the
--scope option will ensure the command within the package will include the necessary dependencies that have been installed in the root directory and linked to the individual package.
See Publishing Releases for publishing workflow.