- Clone and install dependencies
- Run tests
- Lint
- Build a dist version
- Publishing new versions
- Using prerelease versions
> git clone https://github.com/ipfs/js-ipfs.git
> cd js-ipfs
> npm install
This will install lerna and bootstrap the various packages, deduping and hoisting dependencies into the root folder.
If later you add new dependencies to submodules or just wish to remove all the node_modules
/dist
folders and start again, run npm run reset && npm install
from the root.
See the scripts section of the root package.json
for more commands.
# run all the unit tests
> npm test
# run just IPFS tests in Node.js
> npm run test:node
# run just IPFS tests in a browser
> npm run test:browser
# run just IPFS tests in a webworker
> npm run test:webworker
More granular test suites can be run from each submodule.
Please see the package.json
in each submodule for available commands.
Please run the linter before submitting a PR, the build will not pass if it fails:
> npm run lint
> npm run build
- Ensure you have a
GH_TOKEN
env var containing a GitHub Personal Access Token withpublic_repo
permissions - You'll also need a valid Docker Hub login with sufficient permissions to publish new Docker images to the ipfs/js-ipfs repository
- From the root of this repo run
npm run release
and follow the on screen prompts. It will use conventional commits to work out the new package version
Any changed packages from each successful build of master are published to npm as canary builds under the npm tag next
.