-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add description for typescript facet and build script #971
Conversation
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Co-authored-by: Lothar Bender <lothar.bender@sap.com>
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./gen/srv", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daogrady - outDir
seems to match the default value and might not need to be configured. Reading the
value from the cds configuration might even be more robust:
path.join(cds.env.build.target, cds.env.folders.srv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I don't think we can dynamically add values here, as this is the recommendation for the basic layout of a tsconfig.json, which is a static file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the typescript
build task could calculate the default path if outDir
isn't set.
Of course, this is only an option if outDir
isn't used by the typescript compiler itself which seems to be the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct about that! 🙂
But this part of the documentation is about a tsconfig.json the user could manually create to configure how the build task works, hence the preamble "We recommend the following basic setup for such a file:".
cds add typescript
cds build
with TypeScript (which replaces the steps that formerly had to be done manually)cds-typer --help