Skip to content

Latest commit

 

History

History
98 lines (63 loc) · 2.04 KB

CONTRIBUTING.md

File metadata and controls

98 lines (63 loc) · 2.04 KB

How to contribute


System requirements

  • Unix (e.g. macOS or Linux). (Windows may work but there are no guarantees.)
  • Node.js >= v15.0.0.
  • pnpm. (Install it with $ npm install -g pnpm.)

These requirements are for developing; Telefunc can be used with any package manager, Windows, and Node.js >= v12.19.0.


Basics

Install

Download and install the entire monorepo:

git clone [email protected]:brillout/telefunc
# Go to the monorepo root
cd telefunc/
pnpm install

Build & Dev

Build Telefunc's source code:

# At the monorepo root
pnpm run build

Develop Telefunc:

# At the monorepo root
pnpm run dev

Run tests

# At the monorepo root

# Run the end-to-end tests (`/**/*.test.js`)
pnpm exec test-e2e
# Run the unit tests (`/**/*.spec.js`)
pnpm exec vitest
# Typecheck all `.ts` files
pnpm exec test-types

Run only the tests of one example/boilerplate:

cd examples/some-example/ && pnpm exec test-e2e
# Altenertively: provide a substring of the path
pnpm exec test-e2e ome-exampl # At the monorepo root

On Debian, these additional steps are required.


Create new example

New examples should be minimal and implement only what you want to showcase.


Modify existing example

Follow the setup instructions at Basics.

The README instructions of examples use npm. We use pnpm instead if we want to install the entire monorepo and build & link Telefunc's source code.

To run the example:

cd examples/some-example/
# See package.json#scripts, e.g. package.json#scripts['dev']:
pnpm run dev

Check whether the tests defined in examples/some-example/*.spec.ts are still valid and make changes accordingly. See Basics for how to run the example's tests.