- nodejs >= 8
- yarn (used for managing dependencies)
After cloning the repository, from the project's root directory run yarn to
install packages.
From the project's root directory, you can run the following npm scripts:
yarn lint: runs each subproject's code lintersyarn test: runs each subproject's testsyarn coverage: runs each subproject's tests, calculates global code coverageyarn compile: compiles each subproject's codeyarn lerna ...: runs lerna with the supplied command line options
Each subproject defines its own npm scripts, which you can run from the subproject's directory. Look at the subproject's package.json file too see which scripts are available.
This project uses yarn and lerna to manage dependencies.
To install a dependency for a subproject, cd into the subproject's directory
and run:
# use the -D flag for dev dependencies
yarn add my-dependencyTo install a subproject as a dependency of another subproject, cd into the
project's root directory and run:
# use the --dev flag for dev dependencies
yarn lerna add dependency-subproject --scope=dependant-subproject-
prettier is used to enforce code formatting. Installing the prettier extension for your editor of choice is highly recommended
-
commit messages MUST be formatted using the conventional commits commit message guidelines (committing will fail otherwise).
To release a new version of StaticDeploy, run:
yarn releaseThis will prompt you for the version number to use, which must be in the format
X.X.X (eg 1.0.0). The command will then:
- update all versions of all sub-packages
- update the versions in the top level
package.jsonand inlerna.json - commit the changes
- tag the commit as
vX.X.X
Then, push everything to the default remote:
git push --tags origin masterThe CI server (CircleCI) will pick up from here, running tests on the tag, compiling the code and publishing public modules to npm.