The LaunchDarkly toolbar is a React component that provides a developer-friendly mechanism for interacting with LaunchDarkly during development.
This is a monorepo containing the following packages:
- @launchdarkly/toolbar: The LaunchDarkly Developer Toolbar - a unified package containing:
src/core/
- Framework-agnostic toolbar implementation (Shadow DOM, UI components, services)src/react/
- React-specific integrations and utilitiessrc/types/
- TypeScript type definitionsdist/
- NPM package output (ES + CommonJS)cdn/
- CDN bundle output (IIFE for script tag usage)
- demo: Demo application showcasing the toolbar
- mock-server: (for development purposes) Simple express HTTP application that will serve a minified javascript file of compiled toolbar code
For usage instructions and API documentation, read the toolbar package README and the LaunchDarkly documentation.
Before you set up the toolbar, you must have the following prerequisites:
- Node.js 18+
- pnpm
To set up the toolbar:
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run toolbar in watch mode
pnpm dev
# Run mock-server (for hosting compiled toolbar code locally)
pnpm dev:server
# Run demo in development mode
pnpm demo
To test the toolbar:
# Run unit tests
pnpm test
# Run e2e tests (local)
pnpm test:e2e:local
# Run e2e tests (CI)
pnpm test:e2e:ci
The following scripts are available:
pnpm dev
: Build toolbar in watch modepnpm demo
: Run demo applicationpnpm demo:mock
: Run demo with mock flagspnpm build
: Build toolbar for productionpnpm test
: Run unit testspnpm test:e2e:local
; Run E2E tests (local)pnpm test:e2e:ci
: Run E2E tests (CI)pnpm lint
: Run lintingpnpm format
: Format code with Prettierpnpm storybook
: Start Storybook
To learn about development guidelines and contribution instructions, read CONTRIBUTING.md.
Apache-2.0