The project config file for jsrepo.
The jsrepo.json
allows you to configure how jsrepo installs blocks in your project.
You can create a jsrepo.json
by running the init command with the --project
flag:
jsrepo init --project
$schema
is tracked with the cli so you can use a specific version using unpkg:
{
"$schema": "https://unpkg.com/jsrepo@1.47.0/schemas/project-config.json"
}
Where to add specific config files in your project.
{
"configFiles": {
"app.css": "./src/app.css"
}
}
The formatter to use when writing files in your project.
{
"formatter": "prettier" / "biome" / undefined
}
jsrepo can format your files following your local config before adding them to your repository. Currently the only supported formatters are Prettier and Biome.
Whether or not to include test files when installing blocks.
{
"includeTests": false
}
Where to add specific categories in your project.
{
"paths": {
"*": "./src/blocks",
"components": "$lib/components",
"hooks": "$lib/hooks"
}
}
repos
allows you to specify different registries to install blocks from. All of the blocks from each registry will be listed when you run add.
{
"repos": ["gitlab/ieedan/std", "github/ieedan/shadcn-phone-input-svelte"]
}
Whether or not to add a watermark to installed blocks.
{
"watermark": true
}
When true jsrepo adds a watermark to each block that includes the registry that it was added from from.
/*
Installed from github/ieedan/std
*/
export type Point = {
x: number;
y: number;
};