Skip to content

Commit 1242278

Browse files
authored
Merge pull request #148 from segmentio/repo-sync
repo sync
2 parents 4fd889d + 9038d2b commit 1242278

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed
Loading

src/protocols/apis-and-extensions/typewriter.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ SEGTypewriterAnalytics.orderCompleted(
2828
total: 39.99
2929
)
3030
```
31-
32-
> **Note**: Typewriter can currently generate clients for `analytics.js`, `analytics-node`, `analytics-ios` and `analytics-android`.
31+
> note ""
32+
> Typewriter can currently generate clients for `analytics.js`, `analytics-node`, `analytics-ios` and `analytics-android`.
3333
3434
These generated clients are embedded with metadata from your Tracking Plan, which contextualizes your analytics instrumentation, and reduces (or entirely eliminates!) incorrect instrumentations in your production environments. In your editor, you can access event names, descriptions, property names, types and more:
3535

@@ -101,8 +101,8 @@ Typewriter comes with a quickstart wizard that generates a [`typewriter.yml`](#c
101101
```sh
102102
$ npx typewriter init
103103
```
104-
105-
> **Note**: You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
104+
> note ""
105+
> You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
106106
107107
Running the command creates a `typewriter.yml` file in your repo. For more information on the format of this file, see the [Typewriter Configuration Reference](#configuration-reference).
108108

@@ -153,8 +153,8 @@ Typewriter comes with a quickstart wizard that generates a [`typewriter.yml`](#c
153153
```sh
154154
$ npx typewriter init
155155
```
156-
157-
> **Note**: You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
156+
> note ""
157+
> You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
158158
159159
Running the command creates a `typewriter.yml` file in your repo. For more information on the format of this file, see the [Typewriter Configuration Reference](#configuration-reference).
160160

@@ -195,8 +195,8 @@ Typewriter comes with a quickstart wizard that generates a [`typewriter.yml`](#c
195195
```sh
196196
$ npx typewriter init
197197
```
198-
199-
> **Note**: You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
198+
> note ""
199+
> You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
200200
201201
Running the command creates a `typewriter.yml` file in your repo. For more information on the format of this file, see the [Typewriter Configuration Reference](#configuration-reference).
202202

@@ -252,8 +252,8 @@ Typewriter comes with a quickstart wizard that generates a [`typewriter.yml`](#c
252252
$ npx typewriter init
253253
```
254254

255-
> success ""
256-
> **Note**: You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
255+
> note ""
256+
> You can regenerate your Typewriter client by running `npx typewriter`. You need to do this each time you update your Tracking Plan.
257257
258258
Running the command creates a `typewriter.yml` file in your repo. For more information on the format of this file, see the [Typewriter Configuration Reference](#configuration-reference).
259259

@@ -289,8 +289,7 @@ Typewriter requires a Segment API token to fetch Tracking Plans from the [Segmen
289289

290290
Only workspace owners can create Segment API tokens. To create an API token, open the `Tokens` tab on the [Access Management](https://app.segment.com/goto-my-workspace/settings/access-management) page and click `Create Token`. Typewriter only needs the `Protocols Read-only` role.
291291

292-
<!-- This is a pretty tall image with an off-gray background. Just formatting it slightly to reduce its size and add a border. -->
293-
<img src="images/typewriter-token.png" alt="Example Typewriter Token" style="height: 800px; margin: auto; border: 1px solid lightgray">
292+
![typewriter-token](images/typewriter-token.png)
294293

295294
Typewriter looks for an API token in two ways, in the following order:
296295
1. Executes a token script from the `typewriter.yml`. See [Token Script](#token-script) for more information.
@@ -446,8 +445,8 @@ $ npx typewriter development
446445
# To build a production client:
447446
$ npx typewriter production
448447
```
449-
450-
> **Note**: Not all languages support run-time validation. Currently, `analytics.js` and `analytics-node` support it using [AJV](https://github.com/epoberezkin/ajv) (both for JavaScript and TypeScript projects) while `analytics-ios` and `analytics-android` do not yet support run-time validation. Typewriter also does not yet support run-time validation using Common JSON Schema. For languages that do not yet support run-time validation, the development and production clients are identical.
448+
> note ""
449+
> Not all languages support run-time validation. Currently, `analytics.js` and `analytics-node` support it using [AJV](https://github.com/epoberezkin/ajv) (both for JavaScript and TypeScript projects) while `analytics-ios` and `analytics-android` do not yet support run-time validation. Typewriter also does not yet support run-time validation using Common JSON Schema. For languages that do not yet support run-time validation, the development and production clients are identical.
451450

452451
Segment recommends using a development build when testing your application locally, or when running tests. We generally recommend _against_ using a development build in production, since this includes a full copy of your Tracking Plan which can increase the size of the application.
453452

@@ -482,8 +481,8 @@ typewriter.setTypewriterOptions({
482481
onViolation: yourViolationHandler
483482
})
484483
```
485-
486-
> **Note**: Typewriter is preconfigured in `analytics-node` environments to throw an error if `NODE_ENV=test`, which is set by most Node.js testing libraries such as `ava` and `jest`.
484+
> note ""
485+
> Typewriter is preconfigured in `analytics-node` environments to throw an error if `NODE_ENV=test`, which is set by most Node.js testing libraries such as `ava` and `jest`.
487486
488487
Another common use case is to customize how violations are reported to your team. For example, at Segment, we customized this handler to show a [toast notification](https://evergreen.segment.com/components/toaster) to our developers in-app:
489488

0 commit comments

Comments
 (0)