Feature flags
When working on larger features we want to avoid long lived branches with a lot of changes. This can be avoided by hiding the feature behind a feature flag.
Add your flag to the array
featureFlags
insrc/lib/utils/featureFlag.ts
.Go to the relevant component/page and add
typescript
import { isFeatureFlagEnabled } from "$lib/utils/featureFlag";
let isEnabled = isFeatureFlagEnabled("newFeature");
Go to
/admin/debug
to toggle the feature flagUse
svelte
{#if isEnabled}
Awesome new feature goes here
{/if}
in the relevant component/page to hide your feature until it's ready.