Skip to content

Commit 345df40

Browse files
committed
Add info namespaceExport field
1 parent 545aca7 commit 345df40

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

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

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,46 @@ groups:
7676
version: 1.0.0
7777
output:
7878
location: npm
79-
package-name: name-of-your-package
79+
package-name: your-package-name
8080
```
8181
8282
</Step>
8383
84+
<Step title="Configure `namespaceExport`">
85+
86+
The `namespaceExport` option controls the name of the generated client. This is the name customers use to import your SDK (`import { your-client-name } from 'your-package-name';`).
87+
88+
89+
```yaml title="TypeScript" {9-10}
90+
groups:
91+
ts-sdk:
92+
generators:
93+
- name: fernapi/fern-typescript-node-sdk
94+
version: 1.0.0
95+
output:
96+
location: npm
97+
package-name: your-package-name
98+
config:
99+
namespaceExport: your-client-name
100+
```
101+
102+
</Step>
84103

85104
<Step title="Add repository location">
86105

87106
Add the path to your GitHub repository to `generators.yml`:
88107

89-
```yaml title="TypeScript" {10-11}
108+
```yaml title="TypeScript" {11-12}
90109
groups:
91110
ts-sdk:
92111
generators:
93112
- name: fernapi/fern-typescript-node-sdk
94113
version: 0.9.5
95114
output:
96115
location: npm
97-
package-name: name-of-your-package
116+
package-name: your-package-name
117+
config:
118+
namespaceExport: your-client-name
98119
github:
99120
repository: your-org/company-typescript
100121
```
@@ -144,7 +165,7 @@ ts-sdk:
144165
1. Name your token.
145166
1. Set an expiration.
146167
1. Configure your token's access to packages and scopes.
147-
1. Configure your token's access to organizations. In order to fill this out, you must have at least one organization already configured. See [Creating an organization](https://docs.npmjs.com/creating-an-organization) for more information.
168+
1. Configure your token's access to organizations. In order to fill this out, you must have at least one organization already configured in npm. See [Creating an organization](https://docs.npmjs.com/creating-an-organization) for more information.
148169
1. Optionally fill out additional permissions according to your organization's requirements.
149170

150171
<Frame>

0 commit comments

Comments
 (0)