Please see the full documentation with detailed examples and explanations.
We welcome all contributions to colonyJS. Please read our contributing guidelines.
colonyJS is a monorepo-based project. A monorepo is simply a common repository for all npm modules of a certain scope, sharing common modules and dev environments. You can learn more about monorepos here.
Flow typing is also use throughout this repo.
To use yarn workspaces you'll have to activate it in your yarn settings like so:
yarn config set workspaces-experimental true
yarn in the root directory will install all necessary packages (also in
packages/*) and link the interdependencies.
To add a dependency to a particular package, just run
yarn add [packagename]
We're using lerna to publish the packages to npm and to run commands inside the repositories. We're running in lerna's
independence mode, meaning the modules won't all have the same version number and are versioned independently.
To run a command (e.g. the
build command) in all packages just do:
lerna run build
which will call the npm script for
build (more info here).
To publish modules to npm, run:
and it will guide you through the publish process.
To run a command for a single package, lerna ought to be used in order for the environment to resolve the common devDependencies:
lerna run --scope=@colony/my-package-name test