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
+33-42Lines changed: 33 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Publish your public-facing Fern Typescript SDK to the [npm registry](https://www
49
49
50
50
<Steptitle="Configure `output` location">
51
51
52
-
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `npm`:
52
+
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `npm` to indicate that Fern should publish your package directly to the npm registry:
53
53
54
54
```yaml title="TypeScript" {6-7}
55
55
groups:
@@ -65,7 +65,7 @@ Publish your public-facing Fern Typescript SDK to the [npm registry](https://www
65
65
66
66
<Steptitle="Add a unique package name">
67
67
68
-
Your package name must be unique in the npm repository, otherwise releasing your SDK to npm will fail. Update your package name if you haven't done so already:
68
+
Your package name must be unique in the npm repository, otherwise publishing your SDK to npm will fail. Update your package name if you haven't done so already:
69
69
70
70
71
71
```yaml title="TypeScript" {8}
@@ -102,19 +102,21 @@ ts-sdk:
102
102
</Step>
103
103
</Steps>
104
104
105
-
## Create an npm token
105
+
## Set up npm publishing authentication
106
106
107
107
<Steps>
108
108
109
-
<Step title="Log In">
109
+
<Step title="Log into npm">
110
110
111
111
Log into [npm](https://www.npmjs.com/) or create a new account.
112
112
113
113
</Step>
114
114
115
115
<Step title="Navigate to Access Tokens">
116
116
117
-
Click on your profile picture, select **Edit Profile**, and then select **Access Tokens**.
<Warning>When you click **Generate Token**, you’ll be returned to the **Access Tokens** dashboard. A box on the top of the dashboard will confirm that you successfully created a new token and prompt you to copy your token id. Make sure you save this id, as you'll need to add it to your GitHub repository in the later on.</Warning>
134
+
<Warning>When you click **Generate Token**, you’ll be returned to the **Access Tokens** dashboard. A box on the top of the dashboard will confirm that you successfully created a new token and prompt you to copy your token id. Make sure you save this id, as you'll need to add it to your GitHub repository and `generators.yml` later on.</Warning>
135
+
136
+
</Step>
137
+
138
+
<Step title="Add npm Token to your GitHub Repository">
139
+
140
+
<Info>
141
+
Using GitLab? Follow [these steps](/learn/docs/developer-tools/gitlab#add-a-token-to-gitlab) instead.
142
+
</Info>
143
+
144
+
1. Open your repository in GitHub.
145
+
1. Click on the **Settings** tab in your repository.
146
+
1. Under the **Security** section and **Secrets and variables** subsection, select **Actions**.
147
+
148
+
<Info>You can also use the url `https://github.com/<your-repo>/settings/secrets/actions`.</Info>
0 commit comments