|
1 | 1 | <Accordion title="Option 3: Fern Definition"> |
2 | | - 1. Initialize the Fern folder using the Fern Definition by running the following command: |
| 2 | +1. Initialize the Fern folder using the Fern Definition by running the following command: |
3 | 3 |
|
4 | 4 | ```bash |
5 | 5 | fern init --organization <YourOrganization> |
|
26 | 26 | replace `imdb.yml` with your own endpoints, types, and errors before |
27 | 27 | proceeding with the rest of this page. </Note> |
28 | 28 |
|
29 | | - {/* TODO: show what generators.yml looks like, link out to configuration.md */} |
30 | | - |
31 | | - 1. Add the config option `outputSourceFiles: true` to |
32 | | - `generators.yml`. This ensures your SDK contains source files in |
33 | | - your preferred SDK language instead of compiled output. |
34 | | - |
35 | | - ```yaml {11-12} |
36 | | - # yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json |
37 | | - default-group: local |
38 | | - groups: |
39 | | - local: |
40 | | - generators: |
41 | | - - name: fernapi/fern-typescript-node-sdk |
42 | | - output: |
43 | | - location: local-file-system |
44 | | - path: ../sdks/typescript |
45 | | - version: <Markdown src="/snippets/version-number.mdx"/> |
46 | | - config: |
47 | | - outputSourceFiles: true |
48 | | - ``` |
49 | | -
|
50 | | - <Note>`fern init` creates a default configuration that includes the |
51 | | - TypeScript Node SDK generator. The `local` group containing this |
52 | | - generator only generates if you run fern generate without specifying a |
53 | | - group, or if you explicitly target it with `fern generate --group |
54 | | - local`. In subsequent steps, you'll add an additional generator for your |
55 | | - preferred SDK language.</Note> |
56 | | -</Accordion> |
| 29 | + {/* TODO: show what generators.yml looks like, link out to configuration.md */} |
| 30 | + |
| 31 | +2. Add the config option `outputSourceFiles: true` to |
| 32 | + `generators.yml`. This ensures your SDK contains source files in |
| 33 | + your preferred SDK language instead of compiled output. |
| 34 | + |
| 35 | + ```yaml {11-12} |
| 36 | + # yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json |
| 37 | + default-group: local |
| 38 | + groups: |
| 39 | + local: |
| 40 | + generators: |
| 41 | + - name: fernapi/fern-typescript-node-sdk |
| 42 | + output: |
| 43 | + location: local-file-system |
| 44 | + path: ../sdks/typescript |
| 45 | + version: <Markdown src="/snippets/version-number.mdx"/> |
| 46 | + config: |
| 47 | + outputSourceFiles: true |
| 48 | + ``` |
| 49 | +
|
| 50 | + <Note>`fern init` creates a default configuration that includes the |
| 51 | + TypeScript Node SDK generator. The `local` group containing this |
| 52 | + generator only generates if you run fern generate without specifying a |
| 53 | + group, or if you explicitly target it with `fern generate --group |
| 54 | + local`. In subsequent steps, you'll add an additional generator for your |
| 55 | + preferred SDK language.</Note> |
| 56 | +</Accordion> |
0 commit comments