Skip to content

Commit

Permalink
docs: add beta docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ASafaeirad committed Oct 28, 2023
1 parent 57a2c34 commit 9cf8df3
Show file tree
Hide file tree
Showing 7 changed files with 9,337 additions and 5,626 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
- name: Deploy
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: docs/out/
branch: gh-pages
folder: docs/out/
2,484 changes: 1,897 additions & 587 deletions docs/package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
"lint": "next lint"
},
"dependencies": {
"@fullstacksjs/toolbox": "4.4.0",
"@types/node": "20.3.1",
"@types/react": "18.2.13",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"eslint": "8.43.0",
"eslint-config-next": "13.4.7",
"next": "13.4.7",
"nextra": "^2.8.0",
"nextra-theme-docs": "^2.8.0",
"postcss": "8.4.24",
"@fullstacksjs/toolbox": "4.6.1",
"@types/node": "20.8.9",
"@types/react": "18.2.33",
"@types/react-dom": "18.2.14",
"autoprefixer": "10.4.16",
"eslint": "8.52.0",
"eslint-config-next": "14.0.0",
"next": "14.0.0",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.2",
"typescript": "5.1.3"
"tailwindcss": "3.3.5",
"typescript": "5.2.2"
},
"volta": {
"node": "18.16.0",
Expand Down
25 changes: 25 additions & 0 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,28 @@ Config!
## Motivation

TBD

## Usage

```typescript
import { Config } from '@fullstacksjs/config';

const schema = new Config({
port: Config.number({ default: 3000 }),
host: Config.string({ default: 'localhost' }),
token: Config.string(),
featureX: Config.boolean({ default: true }),
});

const config = schema.parse({
port: '4200',
token: 'TOKEN',
host: undefined,
featureX: false,
})

config.get('port'); // 4200
config.get('host'); // 'localhost'

const { port, token, host, featureX } = config.getAll();
```
Loading

0 comments on commit 9cf8df3

Please sign in to comment.