Commit 38369e7
committed
perf(build): use minimal inline PSR-4 autoloader in PHAR
Replace vendored Composer autoloader (which loaded all dev dependencies
like amphp/amp, PHPStan, Psalm etc.) with a tiny spl_autoload_register
that maps KaririCode\Devkit\* → phar://kcode.phar/src/ directly.
Since the project has zero PHP production dependencies, no vendor/
packages are needed inside the PHAR at all.
Result:
Before: ~30 MB, ~50s build (full vendor/ scan)
After: 0.03 MB, 0.07s build (38 src + 1 autoloader = 41 files total)
kcode --help: working correctly1 parent 70adb48 commit 38369e7
1 file changed
Lines changed: 18 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
54 | 44 | | |
55 | | - | |
56 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
| |||
0 commit comments