Generators

Fern | How to use Fern's TypeScript Browser SDK Generator

Source code

Latest version: 0.9.5

The TypeScript Browser SDK generator outputs a fully functional TypeScript/JavaScript SDK for usage in the browser. It can publish the SDK to npmjs.org (or any other Node package repository).

Local

generators.yml
1groups:
2 local:
3 generators:
4 - name: fernapi/fern-typescript-browser-sdk
5 version: 0.9.5
6 output:
7 location: local-file-system
8 path: ../generated/sdk/browser

Publish an internal package

Publish the generated SDK to a private NPM hosted by Fern. Available on the Starter plan.

generators.yml
1groups:
2 internal:
3 generators:
4 - name: fernapi/fern-typescript-browser-sdk
5 version: 0.8.13
6 output:
7 location: npm.buildwithfern.com
8 package-name: "@fern-imdb/api" # replace imdb with your org name

Publish a public package

generators.yml
1groups:
2 publish:
3 generators:
4 - name: fernapi/fern-typescript-browser-sdk
5 version: 0.9.5
6 output:
7 location: npm
8 package-name: imdb-browser # replace imdb with your package name
9 github:
10 repository: imdb/imdb-browser # replace imdb with your org & package name

Configuration options

You can customize the behavior of the TypeScript Browser generator in generators.yml. The options available are identical to the options for the TypeScript Node generator.