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
Existing customization behavior should stay the same - the default behavior is to emit to generated if the dir already exists, src otherwise.
{"src-output-dir": "src/generated",// defaults to "generated" if the directory exists at emit time, "src" otherwise"entry-point-root": "src"// defaults to "src-output-dir" if defined, "src" otherwise}
ls .
filename
example filename
kind
${entry-point-root}/index.ts
src/index.ts
authored
${entry-dir}/models/index.ts
src/models/index.ts
authored
${entry-dir}/api/index.ts
src/api/index.ts
authored
${src-output-dir}/index.ts
src/generated/index.ts
generated
${src-output-dir}/models/...
src/generated/models/...
generated
${src-output-dir}/api/...
src/generated/api/...
generated
If entry-point-root isn't the same as src-output-dir, create each missing authored file of the three listed above, and re-export the corresponding generated index.ts from it. If an authored file already exists, don't change it, since it's meant to be customized by the SDK author.
src/index.ts (only write to this file if it doesn't exist)
export*from"./generated/index.js";
package.json, api-extractor.json, tsconfig.json and .tshy config output need to be updated as well.
The text was updated successfully, but these errors were encountered:
Hi @dgetu if I remember correctly, the customization process v2 has changed the folder structure like
- generated
- src
Customization code will go into src folder directly, and we will run npx dev-tool customization apply-v2 to combine/merge the generated code into the src folder. So that there's no direct reference to the generated folder. You may refer to this loop for more context and I think @timovv is the one who writes the loop.
Example usage:
Existing customization behavior should stay the same - the default behavior is to emit to
generated
if the dir already exists,src
otherwise.ls .
${entry-point-root}/index.ts
src/index.ts
${entry-dir}/models/index.ts
src/models/index.ts
${entry-dir}/api/index.ts
src/api/index.ts
${src-output-dir}/index.ts
src/generated/index.ts
${src-output-dir}/models/...
src/generated/models/...
${src-output-dir}/api/...
src/generated/api/...
If
entry-point-root
isn't the same assrc-output-dir
, create each missing authored file of the three listed above, and re-export the corresponding generatedindex.ts
from it. If an authored file already exists, don't change it, since it's meant to be customized by the SDK author.src/index.ts
(only write to this file if it doesn't exist)package.json
,api-extractor.json
,tsconfig.json
and.tshy
config output need to be updated as well.The text was updated successfully, but these errors were encountered: