Skip to content

Commit 9f60154

Browse files
committed
docs(node-sdk): update markdown documentation with GitHub-style blockquotes
- Convert documentation hints to GitHub-style blockquotes - Update README with new blockquote styles for NOTE, TIP, IMPORTANT, WARNING, and CAUTION - Improve documentation readability and consistency with markdown formatting
1 parent 6005cf3 commit 9f60154

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

docs.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ do
3737
awk '
3838
BEGIN { in_block = 0; content = ""; }
3939
/^> \[!NOTE\]/ { in_block = 1; print "{% hint style=\"info\" %}"; next; }
40+
/^> \[!TIP\]/ { in_block = 1; print "{% hint style=\"success\" %}"; next; }
41+
/^> \[!IMPORTANT\]/ { in_block = 1; print "{% hint style=\"warning\" %}"; next; }
4042
/^> \[!WARNING\]/ { in_block = 1; print "{% hint style=\"warning\" %}"; next; }
41-
/^> \[!DANGER\]/ { in_block = 1; print "{% hint style=\"danger\" %}"; next; }
43+
/^> \[!CAUTION\]/ { in_block = 1; print "{% hint style=\"danger\" %}"; next; }
4244
in_block && /^>/ {
4345
content = content substr($0, 3) "\n";
4446
next;

packages/node-sdk/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ To get started you need to obtain your secret key from the
2020
[environment settings](https://app.bucket.co/envs/current/settings/app-environments)
2121
in Bucket.
2222

23-
{% hint style="danger" %}
24-
Secret keys are meant for use in server side SDKs only.
25-
Secret keys offer the users the ability to obtain
26-
information that is often sensitive and thus should not be used in
27-
client-side applications.
28-
{% endhint %}
23+
> [!CAUTION]
24+
> Secret keys are meant for use in server side SDKs only. Secret keys offer the users the ability to obtain
25+
> information that is often sensitive and thus should not be used in client-side applications.
2926
3027
Bucket will load settings through the various environment variables automatically (see [Configuring](#configuring) below).
3128

@@ -54,7 +51,7 @@ bucketClient.initialize().then({
5451
Once the client is initialized, you can obtain features along with the `isEnabled`
5552
status to indicate whether the feature is targeted for this user/company:
5653
57-
> [!NOTE]
54+
> [!IMPORTANT]
5855
> If `user.id` or `company.id` is not given, the whole `user` or `company` object is ignored.
5956
6057
```typescript
@@ -134,7 +131,7 @@ You can manually flush the batch buffer at any time:
134131
await client.flush();
135132
```
136133

137-
> [!NOTE]
134+
> [!TIP]
138135
> It's recommended to call `flush()` before your application shuts down to ensure all events are sent.
139136
140137
### Rate Limiting
@@ -271,8 +268,7 @@ current working directory.
271268
| `featureOverrides` | Record<string, boolean> | An object specifying feature overrides for testing or local development. See [example/app.test.ts](https://github.com/bucketco/bucket-javascript-sdk/tree/main/packages/browser-sdk/example/app.test.ts) for how to use `featureOverrides` in tests. | BUCKET_FEATURES_ENABLED, BUCKET_FEATURES_DISABLED |
272269
| `configFile` | string | Load this config file from disk. Default: `bucketConfig.json` | BUCKET_CONFIG_FILE |
273270

274-
> [!NOTE]
275-
> `BUCKET_FEATURES_ENABLED` and `BUCKET_FEATURES_DISABLED` are comma separated lists of features which will be enabled or disabled respectively.
271+
> [!NOTE] > `BUCKET_FEATURES_ENABLED` and `BUCKET_FEATURES_DISABLED` are comma separated lists of features which will be enabled or disabled respectively.
276272
277273
`bucketConfig.json` example:
278274

@@ -563,7 +559,7 @@ client.updateCompany("acme_inc", {
563559
const features = await client.getFeaturesRemote("acme_inc", "john_doe");
564560
```
565561
566-
> [!NOTE]
562+
> [!IMPORTANT]
567563
> User and company attribute updates are processed asynchronously, so there might
568564
> be a small delay between when attributes are updated and when they are available
569565
> for evaluation.
@@ -595,7 +591,7 @@ Another way way to disable tracking without employing a bound client is to call
595591
or `getFeatures()` by supplying `enableTracking: false` in the arguments passed to
596592
these functions.
597593
598-
> [!NOTE]
594+
> [!IMPORTANT]
599595
> Note, however, that calling `track()`, `updateCompany()` or `updateUser()` in the `BucketClient`
600596
> will still send tracking data. As such, it is always recommended to use `bindClient()`
601597
> when using this SDK.

0 commit comments

Comments
 (0)