Skip to content

Commit baca4e1

Browse files
committed
updated readme
1 parent ecf5c82 commit baca4e1

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,31 @@ UI-Kit-ts provides several typescript ui components and functionality used throu
55
Checkout the online demo of the [showcase](https://linked-planet.github.io/ui-kit-ts/).
66

77
## Structure
8-
- `library`: library containing all components and functionality
9-
- `showcase`: showcase which demonstrates all components and their usage
8+
9+
- `library`: library containing all components and functionality
10+
- `showcase`: showcase which demonstrates all components and their usage
1011

1112
## Usage
1213

13-
Run the following command in `showcase` directory to start the showcase app and open it in your browser:
14-
```npm run start```
14+
Run the following command to start the showcase app and open it in your browser:
15+
`npm run dev:sc`
16+
17+
To build the library use:
18+
`npm run build:lib`
19+
20+
And the showcase:
21+
`npm run build:sc`
22+
23+
### Localization
24+
25+
ui-kit-ts offers integration of FormatJS to support localization, although no component is tight to it.
26+
Use the LocaleProvider in the locale context to automatically fetch translations of defined messages.
27+
With `npm run messages:extract` defined messages in FormatJS Message components are extracted into the library/localization/translations directory as Json. Create the translated Json using the locale identifier as file name (i.g. extracted is a 'en.json', so we create a 'de.json'). Compilation of the translated messages happens automatically during the build.
28+
29+
When using the LocaleProvider, it will try to download the compiled translations for a set locale from the public/translations-compiled directory. If none is available, it will default back to the default messages.
30+
31+
### Theming
32+
33+
ui-kit-ts supports the Atlassian design system, which is basically a mapping of tokens to css variables. If the used component does not seem to have the proper styling, use the 'initTheming()' function in the theming directory, which sets the themeing attribute in the HTML tag.
1534

16-
make sure to reload all dependency with:
17-
```npm run reload```
35+
Do not forget to add the '@linked-planet/ui-kit-ts/style.css' someplace in your project.

0 commit comments

Comments
 (0)