You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/typescript/publishing-to-npm.mdx
+25-4Lines changed: 25 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,25 +76,46 @@ groups:
76
76
version: 1.0.0
77
77
output:
78
78
location: npm
79
-
package-name: name-of-your-package
79
+
package-name: your-package-name
80
80
```
81
81
82
82
</Step>
83
83
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>
84
103
85
104
<Step title="Add repository location">
86
105
87
106
Add the path to your GitHub repository to `generators.yml`:
88
107
89
-
```yaml title="TypeScript" {10-11}
108
+
```yaml title="TypeScript" {11-12}
90
109
groups:
91
110
ts-sdk:
92
111
generators:
93
112
- name: fernapi/fern-typescript-node-sdk
94
113
version: 0.9.5
95
114
output:
96
115
location: npm
97
-
package-name: name-of-your-package
116
+
package-name: your-package-name
117
+
config:
118
+
namespaceExport: your-client-name
98
119
github:
99
120
repository: your-org/company-typescript
100
121
```
@@ -144,7 +165,7 @@ ts-sdk:
144
165
1. Name your token.
145
166
1. Set an expiration.
146
167
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.
148
169
1. Optionally fill out additional permissions according to your organization's requirements.
0 commit comments