Quickstart

Clone flags and your test repository

Install the local source code to power your example

Build locally and deploy prebuilt to Vercel

// Clone repositories side by side
git clone <https://github.com/vercel/flags.git>
git clone <https://github.com/example/my-adapter-example.git>

// Build your adapter source to link locally
cd flags/packages/adapter-foo
pnpm run build
// watch for changes in development
pnpm run build --watch

// Link your adapter to your example locally
cd my-adapter-example
pnpm add ../flags/packages/adapter-xyz

// Develop locally and test
// Add local envvars for testing in .env.local
// Help developers set up your example by adding .env.example
// Whitelist it from gitignore using !.env.example
// NOTE: if your dev command has `--turbopack` remove it as it's not supported with pnpm link
pnpm run dev

// Prepare to deploy a test to Vercel
vercel link

// Add new envvars on the CLI or dashboard
vercel env add NEXT_PUBLIC_EXAMPLE_ENV

// Deploy to Vercel with your local source (add --prod for prod builds)
vercel build
vercel deploy --prebuilt