From 34856a368c2a1a592ba30850c7043c2d18b0bc38 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Fri, 20 Jun 2025 08:50:42 +0200 Subject: [PATCH 1/4] docs(vue-sdk): simplify getting started docs --- packages/vue-sdk/README.md | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/packages/vue-sdk/README.md b/packages/vue-sdk/README.md index 3c4f6eb8..3a3b1cbd 100644 --- a/packages/vue-sdk/README.md +++ b/packages/vue-sdk/README.md @@ -46,23 +46,6 @@ const huddle = useFeature("huddle"); ``` @@ -128,24 +111,6 @@ The `` initializes the Bucket SDK, fetches features and starts l - `company`, `user` and `otherContext` make up the _context_ that is used to determine if a feature is enabled or not. `company` and `user` contexts are automatically transmitted to Bucket servers so the Bucket app can show you which companies have access to which features etc. > [!Note] > If you specify `company` and/or `user` they must have at least the `id` property, otherwise they will be ignored in their entirety. You should also supply anything additional you want to be able to evaluate feature targeting against, -- `fallbackFeatures`: A list of strings which specify which features to consider enabled if the SDK is unable to fetch features. Can be provided in two formats: - - ```ts - // Simple array of feature keys - fallbackFeatures={["feature1", "feature2"]} - - // Or with configuration overrides - fallbackFeatures: { - "feature1": true, // just enable the feature - "feature2": { // enable with configuration - key: "variant-a", - payload: { - limit: 100, - mode: "test" - } - } - } - ``` - `timeoutMs`: Timeout in milliseconds when fetching features from the server, - `staleWhileRevalidate`: If set to `true`, stale features will be returned while refetching features in the background, @@ -217,6 +182,8 @@ const huddle = useFeature("huddle"); ``` +See the reference docs for details. + ### `useTrack()` `useTrack()` lets you send custom events to Bucket. Use this whenever a user _uses_ a feature. From e6aa5b6051a93d7d064d6807721102c76b1fd58b Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Mon, 23 Jun 2025 09:22:37 +0200 Subject: [PATCH 2/4] fix prettier --- packages/vue-sdk/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vue-sdk/README.md b/packages/vue-sdk/README.md index 3a3b1cbd..68e62bfd 100644 --- a/packages/vue-sdk/README.md +++ b/packages/vue-sdk/README.md @@ -109,6 +109,7 @@ The `` initializes the Bucket SDK, fetches features and starts l - `publishableKey` is used to connect the provider to an _environment_ on Bucket. Find your `publishableKey` under [environment settings](https://app.bucket.co/envs/current/settings/app-environments) in Bucket, - `company`, `user` and `otherContext` make up the _context_ that is used to determine if a feature is enabled or not. `company` and `user` contexts are automatically transmitted to Bucket servers so the Bucket app can show you which companies have access to which features etc. + > [!Note] > If you specify `company` and/or `user` they must have at least the `id` property, otherwise they will be ignored in their entirety. You should also supply anything additional you want to be able to evaluate feature targeting against, From 63567f58e873b15c595fac7c5cd4944b90e05748 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Mon, 23 Jun 2025 10:06:44 +0200 Subject: [PATCH 3/4] docs: use kebab-case convention --- packages/vue-sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue-sdk/README.md b/packages/vue-sdk/README.md index 68e62bfd..81de8126 100644 --- a/packages/vue-sdk/README.md +++ b/packages/vue-sdk/README.md @@ -24,7 +24,7 @@ import { BucketProvider } from "@bucketco/vue-sdk"; From ffcda2d5c30be4532238b33ab7ebb674406268b2 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Mon, 23 Jun 2025 10:08:20 +0200 Subject: [PATCH 4/4] more kebab-case examples --- packages/vue-sdk/README.md | 4 ++-- packages/vue-sdk/dev/plain/App.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vue-sdk/README.md b/packages/vue-sdk/README.md index 81de8126..e0e4fcb9 100644 --- a/packages/vue-sdk/README.md +++ b/packages/vue-sdk/README.md @@ -67,7 +67,7 @@ A number of special attributes exist: ```vue @@ -133,7 +133,7 @@ BucketProvider lets you define a template to be shown while BucketProvider is in ```vue