Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 1.97 KB

CONTRIBUTING.md

File metadata and controls

84 lines (62 loc) · 1.97 KB

Contributing

Setup

You should have node.js and npm installed.

Linting

Linting is done using eslint and the rules are based on standard.

$ npm run lint

Tests

Tests in node

$ npm run test:node

Tests in the browser

$ npm run test:browser

Writing a new core interface test

The core interface tests are kept in a separate repo, because they are used by multiple other projects. To add a core interface test, follow this guide:

  1. Clone this project repo and the interface core tests repo:
    • git clone https://github.com/ipfs/js-ipfs-http-client.git
    • git clone https://github.com/ipfs/interface-js-ipfs-core.git
  2. Install dependencies and globally link the interface core tests:
    • cd interface-js-ipfs-core
    • npm install
    • npm link
  3. Write your test
  4. Install dependencies for this project and link to the interface core tests
    • cd ../js-ipfs-http-client
    • npm install
    • npm link interface-ipfs-core
  5. Run the tests:
    • npm test

Next:

  1. Send a PR to ipfs/interface-js-ipfs-core (please also add to the documentation!)
  2. This will be reviewed by a core contributor and they will perform the same steps as above
  3. When merged, a new version of interface-ipfs-core will be released
  4. Finally, a PR needs to be created or updated to ipfs/js-ipfs-http-client to use the new version

Building browser version

$ npm run build

Releases

The release task will

  1. Run a build
  2. Commit the build
  3. Bump the version in package.json
  4. Commit the version change
  5. Create a git tag
  6. Run git push to upstream/master (You can change this with --remote my-remote)
# Major release
$ npm run release-major
# Minor relase
$ npm run release-minor
# Patch release
$ npm run release