Since `grunt scripts` and `grunt css` are incremental build verbs
(intended to be used after a full rebuild, e.g. by `grunt watch`)
and require cache files to be manually invalidated when switching
between different commits, the "easy" mode frontend building via
`runTests.sh` is now providing a single "build" command that will call
`npm run build` in order to rebuild all frontend assets.
`npm run build`:
a) is fast enough since #106357 (~9sec instead of 40sec).
It has equal runtime, since all build jobs are run
in parallel on different CPU cores
b) ensures that all caches are clean and that the result will pass CI
Also avoid using `npm ci`. `npm ci` is targeted for CI environments,
while `npm install` is targeted for usage on development machines (also
respects package-lock.json, see commit description for #96355), as it
will incremently update node_modules (fast) instead of always wiping it
off.
Please note that CI will still use `npm ci` since the build verification
is performed via `checkGruntClean`.
That means invocations of:
Build/Scripts/runTests.sh -s buildJavascript
Build/Scripts/runTests.sh -s buildCss
Are to be replaced by:
Build/Scripts/runTests.sh -s build
For fine-grained build-target selection or advanced usage it is still
suggested to use nvm or nodejs directly and invoke scripts via `npm`
instead of the `runTests.sh` wrapper, as this avoids the need for
using a TYPO3-specific nodejs image:
cd Build
nvm use
npm run build
# for consecutive watching after an initial rebuild
npm run watch:build
# run JavaScript unit tests as a watcher
npm run watch:test
# building temporary sourcemaps
npm run build -- --sourcemaps