Skip to content

Commit f041e01

Browse files
committed
various fixes to npm guide
1 parent 36d35cb commit f041e01

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

fern/products/sdks/overview/typescript/publishing-to-npm.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ title: Publishing to NPM
33
description: How to publish the Fern Typescript SDK to npm.
44
---
55

6-
Publish your public-facing Fern Typescript SDK to the [npm registry](https://www.npmjs.com/). Once you've followed the steps on this page to connect your npm account to your SDK, Fern will automatically publish the latest version of your SDK.
6+
Publish your public-facing Fern Typescript SDK to the [npm
7+
registry](https://www.npmjs.com/). After following the steps on this page,
8+
you'll have a versioned package published on npm.
79

810
<Info>This guide assumes that you already have an initialized `fern` folder on your local machine. If you don’t, run `fern init`. See [TypeScript Quickstart](quickstart.mdx) for more details.</Info>
911

@@ -21,17 +23,18 @@ Publish your public-facing Fern Typescript SDK to the [npm registry](https://www
2123

2224
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
2325

24-
In order to generate the SDK, add the generator to your `generators.yml` using the `fern <add>` command:
26+
Add a new generator to your `generators.yml` using the `fern <add>` command:
2527

2628

2729
```bash
2830
fern add fern-typescript-node-sdk --group ts-sdk
2931
```
3032

3133
Once the command completes, you'll see a new group created in your `generators.yml`:
32-
34+
3335
```yaml {2-7}
34-
groups:
36+
groups:
37+
local:
3538
...
3639
ts-sdk:
3740
generators:
@@ -93,7 +96,7 @@ groups:
9396
location: npm
9497
package-name: your-package-name
9598
config:
96-
namespaceExport: your-client-name
99+
namespaceExport: YourClientName # must be a valid JavaScript/TypeScript identifier
97100
```
98101
99102
</Step>
@@ -216,7 +219,7 @@ ts-sdk:
216219
Regenerate your SDK and publish it on npm:
217220

218221
```bash
219-
fern generate --version <version>
222+
fern generate --group ts-sdk --version <version>
220223
```
221224
Local machine output will verify that the release is pushed to your repository and tagged with the version you specified. You'll receive an email from npm notifying you that a new version of your package has been successfully published!
222225

0 commit comments

Comments
 (0)