Contributing
How the dotlottie-js project is set up, built, and tested, and how to contribute or report issues.
Contributing to dotlottie-js
This page is for developers interested in the dotlottie-js project setup, build process, or contributing — not for consumers of the published @dotlottie/dotlottie-js package.
Source Code Repository
The source code for dotlottie-js is hosted on GitHub:
Repository URL: https://github.com/dotlottie/dotlottie-js
Here you can find the latest code, report issues, and contribute.
Project Structure
dotlottie-js is a pnpm workspace monorepo managed with Turborepo:
packages/dotlottie-js/: The published@dotlottie/dotlottie-jspackage.src/v1/andsrc/v2/: Format-specific implementations, each split intobrowser/,node/, andcommon/(shared logic) subfolders, plus acommon/schemas/directory holding thevalibotschemas that validate themes, state machines, and the manifest.src/index.browser.ts/src/index.node.ts: The two entry points — the package'sexportsfield routes to the Node build automatically when imported from a Node.js runtime.
apps/: Supporting applications (docs generation, etc.).pnpm-workspace.yaml/turbo.json: Monorepo and task-runner configuration.
Project Setup
The repository enforces pnpm as the package manager — a preinstall script (npx only-allow pnpm) blocks npm install/yarn install.
git clone https://github.com/dotlottie/dotlottie-js.git
cd dotlottie-js
pnpm installBuild Process
Builds run through Turborepo, which fans out to each package's own build script:
pnpm build # runs `turbo run build`Within packages/dotlottie-js, the library itself is built with tsup and type-checked with tsc.
Running Tests
Tests run separately for each target environment using Vitest — Node tests with vitest.config.js, and browser tests (via Playwright) with vitest.browser.config.js:
pnpm test # runs `turbo run test` across the workspace
# or, from packages/dotlottie-js:
pnpm test:node
pnpm test:browserContribution Guidelines
Generally, the process for contributing involves:
Fork the repository.
Create a feature or bugfix branch.
Make your changes, including tests.
Ensure
pnpm lintandpnpm testpass.Add a changeset (
pnpm changelog, backed by Changesets) describing your change, if it affects a published package.Submit a pull request to the main repository, clearly describing your changes.
Reporting Issues
Use the Issues tab on the GitHub repository to report bugs, request features, or ask questions:
Report an Issue: https://github.com/dotlottie/dotlottie-js/issues
When reporting bugs, please provide:
A clear description of the issue.
The
dotlottie-jsversion.Environment (Browser/Node.js version, OS).
Steps to reproduce the issue.
Code samples, if applicable.
Any relevant error messages.
License
dotlottie-js is distributed under the MIT License.