Skip to content

Latest commit

 

History

History
68 lines (57 loc) · 3.44 KB

README.md

File metadata and controls

68 lines (57 loc) · 3.44 KB

Adhese SDK

Release On push License: GPL-3 @adhese/sdk version @adhese/sdk-react version @adhese/sdk-devtools version @adhese/sdk-gambit version @adhese/sdk-shared version @adhese/sdk-stack-slots version @adhese/sdk-vast-url version @adhese/sdk-user-sync version

Introduction

This monorepo contains the Adhese SDK for web. The project uses Turborepo to manage the monorepo. Make sure to run everything from the root of the project.

Running the project

Install dependencies:

npm i

Only use npm to install dependencies. pnpm and yarn will create their own lockfiles and will cause issues when maintaining the project.

Dev mode

Start the dev server:

npm run dev

This will spin up multiple processes at the same time depending on the package or app own configuration. In general, packages will start the test runner in watch mode and the docs app will start a dev server. For example, the apps/example will start a test server on localhost:5173.

Testing

Run all tests:

npm run test

This will run all tests in packages that have tests configured. It will also report test coverage. Currently, all projects use Vitest as the test runner.

Building

Build all packages:

npm run build

This will build all packages and apps.

Linting

Lint all packages:

npm run lint

This will lint all packages and apps. Currently, all projects use ESLint as the linter.

Installing new dependencies

When installing new dependencies, consider the following:

  • Do I need this dependency in all packages?
    • If yes, install it in the root of the project using npm install <package>.
    • If no, install it in the package that needs it using npm install <package> -w <package-name>.
  • Is it a dev dependency?
    • If no, make sure to separately install into the packages/sdk/package.json to make sure that the dependency is not included in the bundle as NPM will handle the dependency.