Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 2.96 KB

DEVELOPING.md

File metadata and controls

110 lines (74 loc) · 2.96 KB

Development Guidelines

Getting the Source

  1. Fork the repository.

  2. Clone your fork of the repository:

    git clone https://github.com/fetchai/fetch-wallet.git
  3. Define an upstream remote pointing back to the main Fetch Wallet repository:

    git remote add upstream https://github.com/fetchai/fetch-wallet.git

Setting up a New Development Environment

Requirements

  • protoc v21.3 (recommended)

      # This script is example for mac arm64 user. for other OS, replace URL(starts with https://..) to be matched with your OS from https://github.com/protocolbuffers/protobuf/releases/tag/v21.3
      curl -Lo protoc-21.3.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.3/protoc-21.3-osx-aarch_64.zip 
    
      #OR
    
      # This script is example for linux x86_64 user
      curl -Lo protoc-21.3.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.3/protoc-21.3-linux-x86_64.zip
    
      unzip protoc-21.3.zip -d $HOME/protoc
      cp -r $HOME/protoc/include /usr/local
      cp -r $HOME/protoc/bin /usr/local
  • Node.js v18+

Install Global Dependencies

npm install --global yarn lerna

# TODO: install [watchman](https://facebook.github.io/watchman/docs/install.html)

Install and build packages

yarn && yarn build:libs

Development

You can boot up a dev server that constantly watches for file changes in all the packages and rebuilds the changed package accordingly.

Local dev server for fetch-extension

yarn dev

Local dev server for mobile

yarn android
yarn ios

Linting

We are using Eslint and Prettier with added rules for formatting and linting. Please consider configuring the local esling + prettier config to your IDE to speed up the development process and ensure you only commit clean code. Linting and formatting will automatically be checked during git commit

Alternately you can invoke lint test by typing the following in the root folder

  yarn lint-test

If there are issues that can be fixed by eslint automatically, you can run the following command to format your code

  yarn lint-fix

Testing

To run tests use the following command:

  yarn test

Contributing

For instructions on how to contribute to the project (e.g. creating Pull Requests, commit message convention, etc), see the contributing guide.