Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 19, 2023
1 parent 038f98b commit a2cd7e8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ Custom [unjs/jiti](https://github.com/unjs/jiti) instance used to import configu

Custom [unjs/jiti](https://github.com/unjs/jiti) options to import configuration files.

### `giget`

Options passed to [unjs/giget](https://github.com/unjs/giget) when extending layer from git source.

### `envName`

Environment name used for [environment specific configuration](#environment-specific-configuration).
Expand Down Expand Up @@ -205,6 +209,39 @@ Layers:
]
```

## Extending Config Layer from Remote Sources

You can also extend configuration from remote sources such as npm or github.

In the repo, there should be a `config.ts` (or `config.{name}.ts`) file to be considered as a valid config layer.

**Example:** Extend from a github repository

```js
// config.ts
export default {
extends: "gh:repo/owner",
};
```

**Example:** Extend from a github repository with branch and subpath

```js
// config.ts
export default {
extends: "gh:repo/owner/test/fixture/_github#main",
};
```

**Example:** Extend with custom configuration ([giget](https://github.com/unjs/giget) options)

```js
// config.ts
export default {
extends: ["gh:repo/owner", { giget: { auth: process.env.GITHUB_TOKEN } }],
};
```

## Environment-specific configuration

Users can define environment-specific configuration using these config keys:
Expand Down

0 comments on commit a2cd7e8

Please sign in to comment.