zeitgeistpm / tools

JavaScript libraries and tools for the Zeitgeist network.
8 stars 3 forks source link

tools

CI

Zeitgeist JavaScript libraries and tools.

@zeitgeistpm/cli

The commandline interface that is built on top of @zeitgeistpm/sdk.

@zeigeistpm/sdk

The main JavaScript library for interacting with the Zeitgeist network.

@zeitgeistpm/type-defs

Type definitions for the Zeitgeist network.

@zeitgeistpm/types

Types for the Zeigeist network.


Development Guide

We develop the JavaScript libraries inside of this monorepo and use Lerna as a tool to help us manage it. This repository uses TypeScript and we do not commit the built JavaScript files. Instead, the files will be generated when we publish the NPM packages, or if called manually by the developer.

Installing Dependencies

After cloning this monorepo to your local machine, you can use yarn to install the dependencies.

Compiling TypeScript

You can use the yarn compile script to compile the TypeScript packages. Inside of each package directory (ex. packages/cli) there will be a dist folder containing the built files. These files are used when publishing the packages to NPM, but are ignored when committing code. So any changes made to the compiled files will be ignored, and instead you should always do development in the TypeScript source.

Publishing to NPM

You will need access credentials to the zeitgeistpm organization on NPM. Once you have this, you are able to run the Lerna script lerna publish which will give you prompts for bumping up the version number and help you to publish a new version of the packages that have changed. By default, Lerna will only publish a new version for the packages that have been changed by checking the diff between the current files and the previous version.

Testing

Running the tests can be done in two ways: