Review main Merged

83942[TASK] Unify Rollup usage in frontend tooling

Andreas Nedbal CR +2 V +2 Hard +174 −198 updated 04/23/24, 14:32

Commit message

In the current frontend tooling, we invoke Rollup twice:

* via grunt-rollup to build library modules
* via the command line to build everything related to CKEditor

This commit gets rid of the first way and moves the library
compilation to a JS-backed configuration as well, so we can
get rid of a grunt package and also unify the tooling a bit.
We also make use of @rollup/plugin-terser instead of the deprecated
rollup-plugin-terser module that was used in ckeditor build before.

To match the new behaviour, the "exec:ckeditor" task also was
renamed to "exec:rollup".

Executed commands:

    npm remove grunt-rollup
    npm remove rollup-plugin-terser
    npm install @rollup/plugin-terser --save-dev
    npm run build

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Andreas Kienast +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 17

Review log 1521

  1. Andreas Nedbal uploaded patch set 1 04/19/24, 19:00

  2. core-ci voted on patch set 1 V -1 04/19/24, 19:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56352

  3. Andreas Nedbal uploaded patch set 2 V -1 04/19/24, 19:13

  4. core-ci voted on patch set 2 V +1 04/19/24, 19:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56353

  5. Andreas Nedbal uploaded patch set 3 V +1 04/19/24, 19:40

  6. core-ci voted on patch set 3 V +1 04/19/24, 19:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56355

  7. Benjamin Franzke commented on patch set 3 04/23/24, 10:31

    Nice in general 👍
    v12 possible

    libraries.js:3

    If we start splitting anyway, maybe one file per lib?
  8. Benjamin Franzke commented on patch set 3 04/23/24, 10:38

    rollup.config.js:1

    We should not write internal libs to the `Scripts` folder. Let's instead just place the rollup code in `Build/rollup/`.
  9. Benjamin Franzke commented on patch set 3 CR -1 04/23/24, 10:49

    on it
  10. Benjamin Franzke uploaded patch set 4 CR -1 V +1 04/23/24, 11:29

  11. Benjamin Franzke commented on patch set 4 04/23/24, 11:29

    Reply

    Done

    ckeditor.js:26

    old ckeditor config not (re)moved

    libraries.js:3 Reply

    Done

    rollup.config.js:1 Reply

    Done
  12. Benjamin Franzke uploaded patch set 5 04/23/24, 11:32

  13. Benjamin Franzke uploaded patch set 6 04/23/24, 11:35

  14. Benjamin Franzke commented on patch set 6 CR +1 V +1 04/23/24, 11:36

    libraries.js:61

    IMO this mapping was not useful (we introduce an own/new rollup-subset in the config above). Therefore I've refactored this pack to plain rollup config.
  15. core-ci voted on patch set 4 V -1 04/23/24, 11:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56570

  16. core-ci voted on patch set 5 V -1 04/23/24, 11:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56571

  17. core-ci voted on patch set 6 V +1 04/23/24, 11:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56572

  18. Benni Mack commented on patch set 6 CR +1 V +1 04/23/24, 13:20

    love that one!
  19. Andreas Kienast voted on patch set 6 CR +1 V +1 04/23/24, 14:09

  20. Benjamin Franzke voted on patch set 6 CR +2 V +2 04/23/24, 14:32

  21. Benjamin Franzke merged patch set 7 04/23/24, 14:32