This repository uses pnpm.
Other package managers may work but are not officially supported for development.
To set up the repository, run:
$ pnpm install
$ pnpm buildThis will install all the required dependencies and build output files to dist/.
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the src/lib/ and examples/ directories.
All files in the examples/ directory are not modified by the generator and can be freely edited or added to.
// add an example to examples/<your-example>.ts
#!/usr/bin/env -S npm run tsn -T
…$ chmod +x examples/<your-example>.ts
# run the example against your api
$ pnpm tsn -T examples/<your-example>.tsIf you’d like to use the repository from source, you can either install from git or link to a cloned repository:
To install via git:
$ npm install git+ssh://git@github.com:cossistantcom/cossistant-typescript.gitAlternatively, to link a local copy of the repo:
# Clone
$ git clone https://www.github.com/cossistantcom/cossistant-typescript
$ cd cossistant-typescript
# With yarn
$ yarn link
$ cd ../my-package
$ yarn link cossistant
# With pnpm
$ pnpm link --global
$ cd ../my-package
$ pnpm link --global cossistant$ pnpm run testThis repository uses prettier and eslint to format the code in the repository.
To lint:
$ pnpm lintTo format and fix all lint issues automatically:
$ pnpm fix