Skip to content

Commit

Permalink
feat: add typos job (refinedev#5271)
Browse files Browse the repository at this point in the history
* feat: add misspel job

* chore: add concurrency and use checkout@v3

* chore: updates

* chore: fail on error

* feat: use typos cli

* chore: update typos config

* fix: typos

* fix: ambiguous typos

* feat: update typos config

* fix: blog typos

* fix: typo on user config

* fix: revert changes on versioned docs

* fix: build error

* fix: typos on js vs ts blog post

* fix: revert readme changes

* fix: typo on readme

* fix: revert redundant changes

* fix: revert redundant changes again

* chore: update .prettierrc

* feat: add fix for inovice typo

* docs(admonitions): add padding lines around admonitions

* fix: build error

* fix: remaining hiccups

---------

Co-authored-by: Ali Emir Şen <[email protected]>
  • Loading branch information
BatuhanW and aliemir authored Nov 21, 2023
1 parent 6098bbe commit 0519c5f
Show file tree
Hide file tree
Showing 453 changed files with 61,132 additions and 67,758 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/doc-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation Spell Check
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
misspell:
concurrency:
group: ${{ github.ref }}-typos-lint
cancel-in-progress: true
name: Check spelling using typos
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v4
- name: typos
id: check_for_typos
uses: crate-ci/typos@master
with:
files: ./documentation/docs
config: ./typos.toml
8 changes: 5 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@
"tabWidth": 4,
"overrides": [
{
"files": ["*.yml", "*.yaml", "*.json"],
"files": ["*.yml", "*.yaml", "*.json", "*.md"],
"options": {
"tabWidth": 2
}
},
{
"files": ["documentation/docs/**/*.{md,mdx,tsx,js,ts}", "documentation/blog/**/*.{md,mdx,tsx,js,ts}"],
"files": [
"documentation/docs/**/*.{md,mdx,tsx,js,ts}",
"documentation/blog/**/*.{md,mdx,tsx,js,ts}"
],
"options": {
"tabWidth": 2,
"printWidth": 120
}
}
]
}

138 changes: 61 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<br/>
<br/>


<div align="center"><strong>Build your <a href="https://reactjs.org/">React</a>-based CRUD applications, without constraints.</strong><br>An open-source, headless web application framework developed with flexibility in mind.

<br />
Expand All @@ -36,7 +35,6 @@
[![Discord](https://img.shields.io/discord/837692625737613362.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/refine)
[![Twitter Follow](https://img.shields.io/twitter/follow/refine_dev?style=social)](https://twitter.com/refine_dev)


<a href="https://www.producthunt.com/posts/refine-3?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-refine&#0045;3" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=362220&theme=light&period=daily" alt="refine - 100&#0037;&#0032;open&#0032;source&#0032;React&#0032;framework&#0032;to&#0032;build&#0032;web&#0032;apps&#0032;3x&#0032;faster | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

</div>
Expand Down Expand Up @@ -71,7 +69,7 @@ This means you can use Refine seamlessly on different platforms like React Nativ

## ⚡ Try Refine

Refine's [browser-based app scaffolder](https://refine.dev/#playground) enables you to build a Refine app through an interactive, step-by-step process in your browser.
Refine's [browser-based app scaffolder](https://refine.dev/#playground) enables you to build a Refine app through an interactive, step-by-step process in your browser.

You have the freedom to select your preferred libraries and frameworks, and the tool generates a ready-to-download boilerplate code. This feature not only lets you preview and tweak your project on the fly but also accelerates the overall development workflow.

Expand All @@ -89,12 +87,12 @@ You have the freedom to select your preferred libraries and frameworks, and the

You can take a look at some live examples that can be built using **refine** from scratch:

- [Fully-functional CRM Application](https://example.crm.refine.dev/)
- [Fully-functional Admin Panel](https://s.refine.dev/readme-admin-panel)
- [Win95 Style Admin panel 🪟](https://win95.refine.dev/)
- [Medium Clone - Real World Example](https://s.refine.dev/readme-medium-clone)
- [Multitenancy Example](https://multi-tenancy-strapi.refine.dev/)
- [Storefront](https://s.refine.dev/readme-ssr-storefront)
- [Fully-functional CRM Application](https://example.crm.refine.dev/)
- [Fully-functional Admin Panel](https://s.refine.dev/readme-admin-panel)
- [Win95 Style Admin panel 🪟](https://win95.refine.dev/)
- [Medium Clone - Real World Example](https://s.refine.dev/readme-medium-clone)
- [Multitenancy Example](https://multi-tenancy-strapi.refine.dev/)
- [Storefront](https://s.refine.dev/readme-ssr-storefront)

[👉 Refer to most popular real use case examples](https://refine.dev/docs/examples/)

Expand Down Expand Up @@ -134,7 +132,7 @@ You can take a look at some live examples that can be built using **refine** fro

There are two ways to create a Refine app: either by using the `create refine-app` CLI tool or the [browser-based app scaffolder](https://refine.dev/#playground).

To quickly start a Refine project with [Ant Design](https://ant.design/) as the default UI framework, run the following command.
To quickly start a Refine project with [Ant Design](https://ant.design/) as the default UI framework, run the following command.

```
npm create refine-app@latest -- -o refine-antd
Expand All @@ -146,7 +144,6 @@ Once the setup is complete, navigate to the project folder and start your projec
npm run dev
```


<br/>

Your **Refine** application will be accessible at [http://localhost:5173](http://localhost:5173):
Expand All @@ -155,21 +152,20 @@ Your **Refine** application will be accessible at [http://localhost:5173](http:/

<br/>


> Note: The command above uses pre-set options for ease. For a different tech stack, simply run:
>
>```
>npm create refine-app@latest
>```
> ```
> npm create refine-app@latest
> ```
Let's consume a public `fake REST API` and add two resources (_blog_posts_ and _categories_) to our project. Replace the contents of `src/App.tsx` with the following code:
```tsx title="src/App.tsx"
import { Refine } from "@refinedev/core";
import {
notificationProvider,
ErrorComponent,
ThemedLayout,
notificationProvider,
ErrorComponent,
ThemedLayout,
} from "@refinedev/antd";
import routerProvider, { NavigateToResource } from "@refinedev/react-router-v6";
import dataProvider from "@refinedev/simple-rest";
Expand All @@ -181,70 +177,60 @@ import { AntdInferencer } from "@refinedev/inferencer/antd";
import "@refinedev/antd/dist/reset.css";
const App: React.FC = () => {
return (
<BrowserRouter>
<Refine
routerProvider={routerProvider}
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
notificationProvider={notificationProvider}
resources={[
{
name: "blog_posts",
list: "/blog-posts",
show: "/blog-posts/show/:id",
create: "/blog-posts/create",
edit: "/blog-posts/edit/:id",
meta: { canDelete: true },
},
{
name: "categories",
list: "/categories",
show: "/categories/show/:id",
},
]}
>
<Routes>
<Route
element={
<ThemedLayout>
<Outlet />
</ThemedLayout>
}
>
<Route index element={<NavigateToResource />} />
<Route path="blog-posts">
<Route index element={<AntdInferencer />} />
<Route
path="show/:id"
element={<AntdInferencer />}
/>
<Route path="create" element={<AntdInferencer />} />
<Route
path="edit/:id"
element={<AntdInferencer />}
/>
</Route>
<Route path="categories">
<Route index element={<AntdInferencer />} />
<Route
path="show/:id"
element={<AntdInferencer />}
/>
</Route>
<Route path="*" element={<ErrorComponent />} />
</Route>
</Routes>
</Refine>
</BrowserRouter>
);
return (
<BrowserRouter>
<Refine
routerProvider={routerProvider}
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
notificationProvider={notificationProvider}
resources={[
{
name: "blog_posts",
list: "/blog-posts",
show: "/blog-posts/show/:id",
create: "/blog-posts/create",
edit: "/blog-posts/edit/:id",
meta: { canDelete: true },
},
{
name: "categories",
list: "/categories",
show: "/categories/show/:id",
},
]}
>
<Routes>
<Route
element={
<ThemedLayout>
<Outlet />
</ThemedLayout>
}
>
<Route index element={<NavigateToResource />} />
<Route path="blog-posts">
<Route index element={<AntdInferencer />} />
<Route path="show/:id" element={<AntdInferencer />} />
<Route path="create" element={<AntdInferencer />} />
<Route path="edit/:id" element={<AntdInferencer />} />
</Route>
<Route path="categories">
<Route index element={<AntdInferencer />} />
<Route path="show/:id" element={<AntdInferencer />} />
</Route>
<Route path="*" element={<ErrorComponent />} />
</Route>
</Routes>
</Refine>
</BrowserRouter>
);
};
export default App;
```
<br/>


🚀 The [**Refine Inferencer package**](https://refine.dev/docs/packages/documentation/inferencer/) automatically generates `list`, `show`, `create`, and `edit` pages by guessing configurations from API data. We've used it here for a quick, clear start, but you can also choose to code your pages from scratch instead of using the Inferencer feature.

Now, you should see the output as a table populated with `blog_posts` & `category` data:
Expand All @@ -268,8 +254,6 @@ You can get the auto-generated page codes by clicking the `Show Code` button on

👉 Play with interactive [examples](https://refine.dev/docs/examples/).



## Contribution

[👉 Refer to the contribution docs for more information.](https://refine.dev/docs/contributing/#ways-to-contribute)
Expand Down
Loading

0 comments on commit 0519c5f

Please sign in to comment.