The hyva-init command
The hyva-init command creates a hyva.config.json file in your theme folder, alongside package.json. This file configures other hyva-* commands.
To run it, use: npx hyva-init.
Configuration Options
Each hyva-* command uses a dedicated top-level key within hyva.config.json for its configuration. Detailed explanations are available on each command's specific documentation page.
For example, the hyva-tokens command uses the tokens key for its specific configuration.
Unsupported keys are ignored, allowing you to include custom options. When adding custom keys, please avoid naming conflicts with Hyvä's reserved keys.
Example Config
Below is a full example configuration, demonstrating options from v1.1 of the hyva-modules package.
{
"tailwind": {
"include": [
{ "src": "<PATH>" }
],
"exclude": [
{ "src": "<PATH>" }
]
},
"tokens": {
"src": "acme-hyva.design.tokens.json",
"values": {
"color": {
"hyva-blue": "oklch(0.38 0.23 265.33)",
}
},
"format": "default",
"cssSelector": ":root"
}
}
Note: The token.format key accepts "default" or "figma" as valid values.