Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Averethel committed Nov 15, 2024
1 parent e93afdf commit 8cf3f22
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ cd <project directory>
npm link ../smg-automotive-components-pkg
```
### Type generation
Chakra UI provides type generation for tokens. This is incorporated into the `typegen` script.
If you're adding new tokens you will need to re-generate the types:
```bash
$ npm run typegen
```

If you're heavily modifying the theme you can watch the changes with:
```bash
$ npm run typegen:watch
```

Since re-installing chakra ui will clean the generated types we're running the type generation as a post-install script.

## Theming

As agreed upon in the [RFC](https://github.com/smg-automotive/au-docs/discussions/3) we will handle the differences between AS24 and MS24 with two different themes. They can be then used via a theme provider that needs to wrap the application:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"lint": "npm run lint:i18n && eslint --ext ts,js,tsx,jsx,json .",
"format:i18n": "npx sort-phraseapp-locales src/locales/de/dict.json src/locales/en/dict.json src/locales/fr/dict.json src/locales/it/dict.json --fix",
"format": "npm run format:i18n && npm run lint -- --fix",
"pretypecheck": "npm run typegen",
"typecheck": "tsc --noEmit",
"typegen": "npx chakra typegen src/themes/autoScout24.ts --clean",
"typegen:watch": "npm run typegen -- --watch",
Expand Down

0 comments on commit 8cf3f22

Please sign in to comment.