Skip to content

Commit

Permalink
Fix readme (#326)
Browse files Browse the repository at this point in the history
* Fix readme

* Add storybook badge

* Naming
  • Loading branch information
sonic16x authored Nov 22, 2024
1 parent ba4272b commit 0687c0e
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: bahmutov/npm-install@v1

- name: Test
run: npm run test:units
run: npm run test:unit

- name: Coveralls
uses: coverallsapp/github-action@master
Expand All @@ -55,7 +55,7 @@ jobs:
run: npx playwright install --with-deps

- name: Generate dictionary
run: npm run generateDictionary
run: npm run generate-dictionary

- name: Test
run: npm run test:pw
Expand All @@ -80,7 +80,7 @@ jobs:
uses: bahmutov/npm-install@v1

- name: Generate dictionary
run: npm run generateDictionary
run: npm run generate-dictionary

build:
name: Build
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
DEMO: true
NODE_ENV: production
run: |
npm run generateDictionary
npm run generate-dictionary
npx webpack --config webpack.config.prod.js
- name: Publish to Cloudflare Pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Build
run: |
npm run lint
npm run test
npm run test:unit
- name: Coveralls
uses: coverallsapp/github-action@master
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
- name: Build
run: |
npm run lint
npm run test
npm run generateDictionary
npm run test:unit
npm run test:pw
npm run generate-dictionary
npm run build
- name: Publish to Cloudflare Pages
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/update-dictionary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ jobs:

- name: Build
run: |
npm run lint
npm run test
npm run generateDictionary
npm run generate-dictionary
npm run build
- name: Publish to Cloudflare Pages
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,55 @@
<img src="src/components/Header/images/logo-icon.svg" alt="Logo" height="32" width="48">
Interslavic language dictionary
<a href='https://coveralls.io/github/sonic16x/interslavic?branch=master'><img src='https://coveralls.io/repos/github/scherebedov/interslavic/badge.svg?branch=master' alt='Coverage Status' /></a>
<a href="https://master--673f7516f3447911dae3b204.chromatic.com" target="_blank"><img src="https://raw.githubusercontent.com/storybooks/brand/master/badge/badge-storybook.svg"></a>
</h1>

[https://interslavic-dictionary.com](https://interslavic-dictionary.com)

## Instalation
Recommended to use and install as PWA (Progressive Web App):

| <video width="341" src="https://github.com/user-attachments/assets/41363610-9e66-4912-83d9-f6c0b537f11b" title="iOS"></video> | <video width="360" src="https://github.com/user-attachments/assets/db4a56ff-0363-47c0-82db-ff9b2e0ca000" title="Android"></video> |
|---|---|

## Development

For start local development install dependencies
```
npm i
```

then run generate dictionary
```
npm run generate-dictionary
```

and now you can start dev server
```
npm run dev
```

## Testing

We have a [storybook](https://master--673f7516f3447911dae3b204.chromatic.com)

For some functions we have a unit tests
```
npm run test:unit
```
also we have playwright tests for main using flows, for run it install playwright
```
npx playwright install --with-deps
```
then you can start tests cli
```
npm run test:pw
```
or run it in ui mode
```
npx playwright test --ui
```

## Acknowledgements

Using dictionary from: [http://steen.free.fr/interslavic/dynamic_dictionary.html](http://steen.free.fr/interslavic/dynamic_dictionary.html)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
},
"scripts": {
"start": "npm run dev",
"test:units": "jest --logHeapUsage --coverage",
"test:unit": "jest --logHeapUsage --coverage",
"test:pw": "playwright test",
"dev": "cross-env NODE_ENV=development webpack serve --config webpack.config.dev.js --progress",
"lint": "eslint src/**/*.{ts,tsx}",
"lint-fix": "eslint src/**/*.{ts,tsx} --fix",
"generateDictionary": "ts-node -r tsconfig-paths/register ./src/services/generateDictionary.ts",
"lint:fix": "eslint src/**/*.{ts,tsx} --fix",
"generate-dictionary": "ts-node -r tsconfig-paths/register ./src/services/generateDictionary.ts",
"build": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js",
"deploy-api": "wrangler deploy ./src/server/index.ts --name api --compatibility-date 2024-11-12",
"storybook": "storybook dev -p 6006",
Expand Down

0 comments on commit 0687c0e

Please sign in to comment.