We welcome contributions to the Hyperledger Fabric Project in many forms, and there's always plenty to do!
Please visit the contributors guide in the docs to learn how to make contributions to this exciting project.
This repo is structured as a monorepo using Rush. Why a monorepo? There are multiple npm modules that are published from this repo, including end to end tests, and tooling. It is siginficant easier to manager within one repo - and Rush has proven to provide excellent support for management of issues such as different depenency versions.
The standard Rush convetions are followed as much as possible, deviation only coming with publishing and broad release version control. This deviation is to fit in with the existing Hyperledger Fabric release process - and some of these features in Rush are still evolving. This current Rush configuration is also not meant to be the final configuration; happy to enterain changes to improve the structure
The following Rush categories are used - and are seen as top level folders
apis
contains thefabric-contract-api
andfabric-shim-api
modulestools
contains a set of scripts for build tooling (evolved from thebuild
folder that existed previoulsy)libraries
contains thefabric-shim
andfabric-shim-crypto
modulesdocker
contains the scripts and dockerfile for the nodeenv imagedocs
contains theapidocs
building scripts
- node v10.15.2 (npm v6.4.1) => recommend to use nvm
- rush =>
npm install -g @microsoft/rush
Note that npm v6 has some bugs that mean adding new depencies etc are not properly picked up. Longer term we should consider moving to yarn or pnpm. However in practice this isn't a serious problem and has been possible to be worked around by issuing
rm ./common/config/rush/npm-shrinkwrap.json
and thenrush update
- Clone the repo, and ensure you are using node10.
rush install
to get the main linking setup, and check rush is installed correctly.rush update
is needed to ensure evertyhing is correctly linked and updated.
At this point the repo is fully ready for use and running tests, etc. A full sequence of build-test that would equivalent to the CI pipeline would be
rush rebuild
will run the linting, and unit tests across the codebase, as well as building the docker images, and jsdoc API docsrush start-verdaccio
will start verdacciorush start-fabric
will start the test fabric ready for running FV testsrush test:fv
will run the fv tests, ensure that both the fabric and verdaccio have already been startedrush test:e2e
to run e2e tests across the repos
For more specific purposes during development the following are useful.
rush publish --include-all --pack --release-folder ./tarballs --publish
If you want to get a set of.tar.gz
files of the node modules to use for local testing this command will put them into thetarballs
directoryrush rebuild --to fvtests
to run the unit tests for the core modules, but not the docker or jsdocrush rebuild --to fabric-contract-api
to build, lint and run just thefabric-contract-api
Each individual module will write out logs files to it's own directory.
See our Code of Conduct Guidelines.
Should you have any questions or concerns, please reach out to one of the project's Maintainers.
This work is licensed under a Creative Commons Attribution 4.0 International License.