Skip to content

Commit a63033f

Browse files
committed
[RFC] Remove build phases
As discussed today between @matz3, @tommyvinhlam, @codeworrior, @RandomByte Build phases would allow for more precise extensibility of a types build execution. Mainly scenarios where only a single task should be replaced or added could overwrite one of the build phases to hook in-between of certain sets of tasks. Instead, they will have to overwrite the whole build function containing all tasks. The main reason for this decision is the lack of known extensibility use-cases. Therefore we do not want to decide on the naming and semantics of any build phases yet as changing them later on will hardly be possible.
1 parent 4e1252f commit a63033f

File tree

1 file changed

+6
-30
lines changed

1 file changed

+6
-30
lines changed

rfcs/0001-type-extensibility.md

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,16 @@ Multiple UI5 projects may require the same kind of "customized" build. Therefore
2222

2323
## Detailed design
2424
### Extensibility of types
25-
Leverage the existing mechanism of types (currently for application and library), allow for a custom type and do the necessary adaption via regular JS language features (i.e. object-orientation, deriving and overriding).
26-
27-
The `AbstractBuilder` (as well as any subclass-implementation) offers a set of functions which can be overwritten.
28-
29-
#### Combined list of tasks executed by application- and library types
30-
- replaceCopyright
31-
- replaceVersion
32-
- buildThemes
33-
- generateLibraryPreload
34-
- createDebugFiles
35-
- uglify
36-
- generateFlexChangesBundle
37-
- generateManifestBundle
38-
- generateAppPreload
39-
- generateStandaloneAppBundle
40-
- generateVersionInfo
41-
42-
#### Functions of the `AbstractBuilder` ("Phases")
43-
1. preprocess()
44-
- replaceCopyright
45-
- replaceVersion
46-
1. process()
47-
- createDebugFiles()
48-
- buildThemes()
49-
1. bundle()
50-
1. postprocess() / optimize()
51-
- uglify()
25+
Leverage the existing mechanism of types (currently for application and library), allow for a custom type and do the necessary adaption via regular JavaScript language features (i.e. object-orientation, deriving and overriding).
26+
27+
The `AbstractBuilder` (as well as any subclass-implementation) offers a set of functions which can be overwritten. Mainly the `build` function.
5228

5329
A custom types `Builder`-module shall extend another types builder or the generic `AbstractBuilder` and overwrite relevant functions:
5430
```js
5531
class MyCustomBuilder extends AbstractBuilder {
56-
bundle() {
57-
super.bundle();
58-
myCustomBundle();
32+
build() {
33+
super.build();
34+
myCustomBuildTask();
5935
}
6036
}
6137
```

0 commit comments

Comments
 (0)