Commit 5804d87
Doc improvements on 'Custom Builds' (#1837)
## Minor Changes
- consistent formatting of config values in `monospace font` (rather
than _italics_, which is used more for file names)
- some changes in wording
- make connections within the guide explicit that were implicit before
- added file name header to snippets to make it more immediately clear
where they are supposed to go
- use `<Config>` tag where appropriate
## Structural Changes From Manual Testing For CDS9
- 🔴 bad, shows bad practices
- 🟡 could be improved, best practices are missing
- 🟢 good (not necessarily perfect)
_I added a related snippet for convenient searching of the relevant
section, followed by my feedback._
-----
> provides options you can use to switch the copy behavior on build task
level on or off
🔴 the following example doesn't really make it clear how the behaviour
can be changed or what the options shown in the configuration do
exactly. ✅
-----
> If custom build tasks are configured, those properties have precedence
For example, you want to configure the src folder and add the default
models. To achieve this, do not define the model option in your build
task.
🔴 How else should we do it then? ✅
-----
> Such a setup is often referred to as a [monorepo]
The link then leads to an external blog entry about monorepos.
🟡 This feels a bit weird and out of place. There doesn't seem to be an
official guide about mono repos, which is probably the reason why this
link was used instead. But maybe we can find something else? ✅ (did not
find anything more official)
-----
> The for property defines the executed build task type. Currently
supported types are:
The section then lists various parameters for the `for` parameter.
🟡 I am not entirely sure how to feel about this section. While it
currently seems to be up to date, it will inherently become outdated at
some point and is basically a clone of what `cds build --help` would
list under the appropriate section for `--for`. Could we instead have
the output of `cds build --help` here and make that more explicit
instead? We do this similarly [for
cds-typer](https://cap.cloud.sap/docs/tools/cds-typer#typer-cli).
✅ (postponed: /cds-tools/issues/1541)
-----
> It is resolved based on the root folder of your project.
🟡 The following section shows an example of a configuration done in
_package.json_. This is one of multiple places where we can see this
pattern. We have the `<Config>` custom tag to show various ways of
including a configuration, aside from _package.json_ nowadays. Could/
should we use this more excessively here? ✅
-----
> for each workspace dependency of your project that has a `*` version
identifier
🔴 This needs an example! ✅
-----
> A build plugin is a Node.js module complying to the CDS plugin
architecture
The following code blocks shows an outdated version of the postgres
build plugin.
🔴 I don't think we should duplicate the code at this point. We link to
the `main` branch of the repository containing this plugin just above. I
don't see how showing a larger code block that will inherently be
outdated without added explanation brings any value to the table. (The
section after that _does_ go into detail about some of the methods, but
not all. So even if we wanted to use this particular plugin as an
illustration of the API, it is just not complete and would benefit more
from having the actual API doc included at this point.)
**Opportunity to include exported type information inside CAPire?!**
@chgeo
✅ (we discussed it and came to the conclusion to leave it in. Types can
follow at a later point in time.)
-----
---------
Co-authored-by: Christian Georgi <chgeo@users.noreply.github.com>
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>1 parent 704ff03 commit 5804d87
1 file changed
+51
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
33 | 53 | | |
34 | 54 | | |
35 | | - | |
| 55 | + | |
36 | 56 | | |
37 | 57 | | |
38 | 58 | | |
39 | 59 | | |
40 | 60 | | |
41 | 61 | | |
42 | 62 | | |
43 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
44 | 66 | | |
45 | 67 | | |
46 | 68 | | |
| |||
52 | 74 | | |
53 | 75 | | |
54 | 76 | | |
| 77 | + | |
| 78 | + | |
55 | 79 | | |
56 | 80 | | |
57 | 81 | | |
| |||
89 | 113 | | |
90 | 114 | | |
91 | 115 | | |
92 | | - | |
| 116 | + | |
| 117 | + | |
93 | 118 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 119 | | |
100 | 120 | | |
101 | 121 | | |
102 | 122 | | |
103 | | - | |
| 123 | + | |
104 | 124 | | |
105 | 125 | | |
106 | 126 | | |
| |||
112 | 132 | | |
113 | 133 | | |
114 | 134 | | |
115 | | - | |
| 135 | + | |
116 | 136 | | |
117 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
118 | 140 | | |
119 | 141 | | |
120 | 142 | | |
| |||
125 | 147 | | |
126 | 148 | | |
127 | 149 | | |
| 150 | + | |
| 151 | + | |
128 | 152 | | |
129 | 153 | | |
130 | 154 | | |
131 | 155 | | |
132 | 156 | | |
133 | 157 | | |
134 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
135 | 170 | | |
136 | 171 | | |
137 | 172 | | |
| |||
145 | 180 | | |
146 | 181 | | |
147 | 182 | | |
148 | | - | |
| 183 | + | |
149 | 184 | | |
150 | 185 | | |
151 | 186 | | |
| |||
0 commit comments