Commit 31c70e0
committed
Remove dead JS-bundling code from Bundle.php, drop updateGruntfile.php, make npm a hard install requirement
Bundle::all() has returned [] unconditionally since before this change (Grunt/terser
JS bundling was dropped when we moved to rollup), making its ~70-line body,
Bundle::urls(), and the bundle-cache lookup in js_includes() all unreachable.
Bundle::getImportMap() only did real work by looping over self::all(true), so it
too was provably always returning []; its Gruntfile.js regex-parsing (including a
now-nonexistent 'terser' config key) is removed along with it. js_includes() keeps
its per-file resolution (cache-buster, *.min.js companion lookup), which is the
only part that was ever doing anything.
updateGruntfile.php regenerated that dead 'terser' config and isn't wired into any
npm/composer/CI script; removed rather than fixed.
Gruntfile.js and build-css.mjs's doc-comments updated - Gruntfile.js is NOT dead,
build-css.mjs (npm run css) still reads its cssmin config directly, just no longer
via the grunt CLI.
install-cli.php previously let npm be missing and skipped `npm install`/`npm run
css`/`npm run build` with just a warning. Since CSS/JS bundling now requires npm
unconditionally (there's no longer a PHP-side fallback bundler), treat it like
php/git/composer: exit(1) if missing.1 parent c0aa5be commit 31c70e0
4 files changed
Lines changed: 58 additions & 394 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
21 | 18 | | |
22 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
0 commit comments