Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes some typos #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ project whenever you 'restore' the project. As you bundle the code/binaries of t
with the component on build time, you guarantee that you configuration always matches the used
version of the component.

There is currenlty only one component provider available, `dotnet-package`, which scans the
There is currently only one component provider available, `dotnet-package`, which scans the
project's assemblies for embedded resources describing a Confix component.
But we are open to add more component providers in the future, such as `node-modules`, which checks
the node-modules used by the project for Confix components.
Expand Down Expand Up @@ -184,7 +184,7 @@ confix component list
- Other
```

You can also define a `--format` to export the conmponent as json
You can also define a `--format` to export the component as json

```bash
confix component list --format json
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/components/inputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ In the folder with the `.confix.project` file, we can now run:
confix component init Authorization
```

This will generate the `Authroization` component for us. The file structure will look like this:
This will generate the `Authorization` component for us. The file structure will look like this:

<FileTree>
<FileTree.Folder name="/" defaultOpen>
Expand Down Expand Up @@ -151,14 +151,14 @@ We will get error messages that the appsetting.json file is missing the `Authori
</FileTree>

When we open the root folder now in VSCode, we get intellisense for the `appsettings.json` file.
![Component intelisense](./assets/component-intelisense.png)
![Component intellisense](./assets/component-intellisense.png)

## Supported Component Inputs:

Here is a list of currently supported component inputs:

Currently supporter components inputs are:
|Name|Descripion|
|Name|Description|
|---|---|
|`graphql`|Allows you to define a graphql file which can be used to define the json schema
|`dotnet`| This will add the components as an embedded resouource to the .net project that defines the component
|`dotnet`| This will add the components as an embedded resource to the .net project that defines the component
2 changes: 1 addition & 1 deletion docs/pages/components/providers/dotnet-package.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dotnet Package

This provider reads components that are embeded in a .NET package and distributed through a package
This provider reads components that are embedded in a .NET package and distributed through a package
repository.

You can read more about components in [Components](./components)
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/components/providers/git.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Git

Use this provider to access components that located in a separate repository.
This is useful to share compone across multiple repositories without having to
This is useful to share components across multiple repositories without having to
distribute them as a package.

Components can be added to a project by executing:
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/components/providers/local.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FileTree } from "nextra-theme-docs";

# Local

The local provider is implicity added to the list of providers without the need for any configuration.
The local provider is implicitly added to the list of providers without the need for any configuration.
It provides the project will all components that are available in the current project.

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ Create and tailor environments to ensure your configuration thrives in multiple

### [Deploying Your Application](/getting-started/6-deploying-your-application)

We are going to look into various deployment strategies and learn how to bring your application to produciton.
We are going to look into various deployment strategies and learn how to bring your application to production.

</Steps>
4 changes: 2 additions & 2 deletions docs/pages/getting-started/2-first-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FileTree } from "nextra-theme-docs";
This guide will walk you through setting up a simple
[.net core project](https://dotnet.microsoft.com) to show you how to work with Confix. Confix is
versatile and
can work with any language or framework, making it a handy tool for your project aswell.
can work with any language or framework, making it a handy tool for your project as well.

There might be some limitations depending on your particular needs. Feel free to get in touch with
us if you're keen on using Confix with your preferred framework, and we'll be happy to help.
Expand All @@ -32,7 +32,7 @@ potential for expansion to cover new requirements. Like with other modular syste
initial setup is required to align Confix with your project's needs.

The configuration details for Confix are in a file named `.confixrc`. This file is organized into
two main sections; namley "component" and "project".
two main sections; namely "component" and "project".

- The "component" section defines configuration for Confix [Components](/components)
- In the "project" section, you can define configuration for your project
Expand Down
16 changes: 8 additions & 8 deletions docs/pages/getting-started/3-exploring-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ and give us autocompletion and validation.
</FileTree>

When we run the command `confix build` in the `Website` folder we now see that our component is
loaded and that the configuration we have is applied.
loaded and that the configuration we have created is applied.

```bash copy
confix build
Expand Down Expand Up @@ -123,14 +123,14 @@ Output:
```

When we open the `appsettings.json` file we see that the configuration was initialized and `Url` is
set to `null`. The intelisense tells us that the `Url` cannot be empty and has to have a value.
set to `null`. The intellisense tells us that the `Url` cannot be empty and has to have a value.

![VSCode](./assets/exploring-components-1.png)

## Using input providers

Defining JSON schemas is a pain. It's a lot of work and it's easy to make mistakes. Confix has a
features called `Component Inputs`. These allow you to process components and generate a schema
feature called `Component Inputs`. These allow you to process components and generate a schema
based on the result. We will use the `graphql` provider to generate a schema based on a GraphQL
file.

Expand Down Expand Up @@ -251,11 +251,11 @@ You can ship the component together with the package and confix automatically re

This has some advantages:

- The component is versioned together with the source code. This means that you can evolve the shape of the configuration together with the component. If you decide to introduce a breaking change in the configuration, once you upgrade the package to theis version, confix will tell you that the configuration is invalid.
- The component is versioned together with the source code. This means that you can evolve the shape of the configuration together with the component. If you decide to introduce a breaking change in the configuration, once you upgrade the package to this version, confix will tell you that the configuration is invalid.
- There is no external component needed (like a git repository). You just reference the package and you are good to go.

First, to make the components discoverable in .NET, we need a special "component input".
This input will registry the component as a embedded resource in the package.
This input will register the component as a embedded resource in the package.

Secondly, we need to tell confix to look for components in the package. For this we use a "component provider".
Component providers are responsible for loading components from different sources e.g. `git` or packages
Expand Down Expand Up @@ -299,7 +299,7 @@ Lets create a shared database component.
<Steps>
### Creating the package

Naviagate to the /src folder and execute the following command:
Navigate to the /src folder and execute the following command:

```bash copy
cd src
Expand All @@ -308,9 +308,9 @@ cd Database
dotnet add package Microsoft.Extensions.DependencyInjection
```

### Add a extension method
### Add an extension method

Add a extension method to the class library that registers the component.
Add an extension method to the class library that registers the component.

```csharp filename="src/Database/DatabaseServiceCollectionExtensions.cs" copy
using Microsoft.Extensions.DependencyInjection;
Expand Down
14 changes: 7 additions & 7 deletions docs/pages/getting-started/4-using-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ Explore more about variable providers in the [variable documentation](/variables
For simplicity, we'll use the `local` variable provider to store our `ConnectionString` and `Url` values. This is obviously not a secure approach, but it's a good starting point to explain how the providers work.

<Callout type="info">
In a real scenario you probably want to use something like the
In a real world scenario you probably want to use something like the
[`azure-keyvault`](/variables/azure-keyvault) or the
[`secret`](/variables/secrets) provider to secure your sensitive data.
</Callout>

As explained before, to discover variables we need to config `variableProviders`. We have to add this to the `.confixrc`:
As explained before, to discover variables we need to configure `variableProviders`. We have to add this to the `.confixrc`:

```json filename=".confixrc" copy
{
Expand Down Expand Up @@ -117,8 +117,8 @@ As explained before, to discover variables we need to config `variableProviders`

## Defining variables

The variable provider `example` of the type `local` is configured to use the file `variables.json` in the project direcotries.
Variables always start `${name}:` (in out case `$example:`) and then are followed by a path separated by `.`.
The variable provider `example` of the type `local` is configured to use the file `variables.json` in the project directories.
Variables always start with `${name}:` (in out case `$example:`) and then are followed by a path separated by `.`.

Lets set the variable `$example:Website.Url`

Expand Down Expand Up @@ -206,7 +206,7 @@ confix variable list
</Tab>
</Tabs>

When we do a `confix restore` the variables become available as intellisense the configuration file.
When we do a `confix restore` the variables become available as intellisense in the configuration file.

<Tabs items={["VSCode", "Command", "Output"]}>
<Tab>
Expand Down Expand Up @@ -256,8 +256,8 @@ Up until now, we've only defined variables. Now we'll use them in our configurat
}
```

When we now run 'confix build' the variables are replaced with the values from the variable provider.
As we use the `appsettings` configuration file, the variables are not replaced in the `appsettings.json` but stored in user secrets.
When we now run 'confix build' the variables are being replaced with the values from the variable provider.
Since we are using the `appsettings` configuration file, the variables are not replaced in the `appsettings.json` but stored in user secrets.

<Tabs items={["appsettings.json", "usersecrets.json", "Command", "Output"]}>
<Tab>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/getting-started/5-building-environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ One challenge is that we have only one `variables.json` file, but we need separa
This is a common issue for all variable providers.
For example, if using the `azure-keyvault` provider, you'd likely want different keyvaults for each environment.

Confix configuration has a concept of `environmentOverride` to allow for settings to changes in each environment.
Confix configuration has a concept of `environmentOverride` to allow for settings to change in each environment.
In this scenario, we can set up `dev` and `prod` overrides for the `example` variable provider, specifically changing the `path` property.

```json filename=".confixrc" copy /environmentOverride/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ confix validate --environment=dev

To build a configuration in a CI/CD pipeline you can use the `confix build` command.
This will replace all the placeholders in your configuration files with the values from the variables.
In case you want to build more than one enviromnet file, you can use the `--output-file` parameter to specify the output file to avoid overriding each other.
In case you want to build more than one environment file, you can use the `--output-file` parameter to specify the output file to avoid overriding each other.

```bash
confix build --environment=dev --output-file ./appsettings_dev.json
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/reporting/dependency-tracking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ GraphQL schema can be annotated with the `@dependency` directive, and Confix wil
as dependencies.

**Example**: Annotating a field for a MongoDB database in a GraphQL schema with
`@dependency(kind: "mongodb.database")` will let Confix extract the field's value as depndency
`@dependency(kind: "mongodb.database")` will let Confix extract the field's value as dependency
of kind `mongodb.database`.

```json filename=".confixrc"
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Here's an example JSON configuration file that uses Confix variables:
},
"logging": {
"level": "$git:logging.level",
"destinatin": "$git:logging.server.url"
"destination": "$git:logging.server.url"
},
"appSecrets": {
"apiKey": "$secret:aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1hM1o3ekVjN0FYUQ==",
Expand Down