Skip to content

Latest commit

 

History

History
106 lines (76 loc) · 1.57 KB

contributing.md

File metadata and controls

106 lines (76 loc) · 1.57 KB
title order
Contributing
2

Contribute

Set up

Clone the repo.

$ git clone https://github.com/ddnlink/ddn.git

Install dev deps after git clone the repo.

$ cd ddn
$ yarn

Bootstrap every package with yarn. (Need to execute when new package is included)

$ yarn bootstrap

Build first.

$ yarn build / -w

Run it in an other terminal.

$ cd examples/fun-tests
$ yarn start

If you watch nothing,please do that

$ cd examples/fun-tests
$ touch .ddnrc.local.js

and then, copy the follow content to .ddnrc.local.js

/*---------------------------------------------------------------------------------------------
 *  This is your config local.
 *--------------------------------------------------------------------------------------------*/

module.exports = {
  /**
   * About Peer
  */
  // port: 8001,
  // address: "127.0.0.1",
  // publicIp: "",
  logLevel: "info", // This allows the command line to output more info for development testing
  // net: "testnet"
}

Common Tasks

Monitor file changes and transform with babel.

$ yarn build --watch

Run test.

# Including e2e test
$ yarn test

# Unit test only
$ yarn test .test.(t|j)s

# Test specified file and watch
$ yarn test getMockData.test.js -w

# Test specified package
$ PACKAGE=core yarn test

# Don't run e2e test
$ E2E=none yarn test

# Generate coverage
$ yarn test --coverage

Publish to npm.

# Generator the changelog first.
$ yarn changelog

# Do not use yarn for this command.
$ npm run publish