-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
20 lines (17 loc) · 798 Bytes
/
install.php
File metadata and controls
20 lines (17 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
use Ynamite\ViteRex\Config;
use Ynamite\ViteRex\StubsInstaller;
// Seed rex_config with defaults for any unset/empty keys, then write structure.json.
// On first install everything is unset → all defaults written. On re-install,
// only previously-cleared (or never-set) keys are repopulated; user-customized
// values stay intact. Idempotent.
Config::seedDefaults();
// Push viterex_addon's own npm deps into the user's project package.json.
// Additive + version-compare merge — won't downgrade or duplicate. Lets the
// Vite plugin resolve `svgo` from node_modules after the user runs `npm install`.
// Existing-install upgrade path; fresh installs get svgo via stubs/package.json.
StubsInstaller::syncPackageDeps([
'devDependencies' => [
'svgo' => '^4.0.0',
],
]);