@graasp/sdk
v5.16.5
Published
Development kit including type definitions and util functions for the Graasp ecosystem.
Keywords
Readme
Graasp SDK
This repository contains all shared utils and types for the Graasp ecosystem.
Installation
Use pnpm to install the packages.
pnpm iTesting
This project uses vitest as the test runner. It is fast, supports ESM and has an API similar to Jest (which was used previously).
To start the tests run:
pnpm testThe tests will run in watch mode, meaning that when you edit a file, the tests in that file (or any test file depending on that file) will be re-run. This allows for a fast feedback loop.
Building
This package exposes a ESM and a CommonJS build as well as type declarations for Typescript.
To build the package:
pnpm buildThe structure is as follows:
esmcontains the javascript files to use with ECMAScript Modules (ESM) it is built with thetsconfig.esm.jsonfile.cjscontains the javascript files to use with CommonJS it is built with thetsconfig.cjs.jsonfile.typescontains the type declarations for Typescript it is built with thetsconfig.types.jsonfile.
The last bit of the build process is to add a single line package.json file in esm and cjs with the correct value for the type key (commonjs for cjs and module for esm).
