Created by Github action --------- Co-authored-by: github-actions <github-actions@twenty.com>
97 lines
2.8 KiB
Plaintext
97 lines
2.8 KiB
Plaintext
---
|
|
title: أوامر الواجهة الأمامية
|
|
image: /images/user-guide/create-workspace/workspace-cover.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/create-workspace/workspace-cover.png" alt="Header" />
|
|
</Frame>
|
|
|
|
## الأوامر المفيدة
|
|
|
|
### "بدء التطبيق"
|
|
|
|
```bash
|
|
npx nx start twenty-front
|
|
```
|
|
|
|
### "إعادة توليد مخطط graphql بناءً على مخطط API graphql"
|
|
|
|
```bash
|
|
npx nx run twenty-front:graphql:generate --configuration=metadata
|
|
```
|
|
|
|
"أو"
|
|
|
|
```bash
|
|
npx nx run twenty-front:graphql:generate
|
|
```
|
|
|
|
### "التدقيق"
|
|
|
|
```bash
|
|
npx nx run twenty-front:lint # pass --fix to fix lint errors
|
|
```
|
|
|
|
## "الترجمات"
|
|
|
|
```bash
|
|
npx nx run twenty-front:lingui:extract
|
|
npx nx run twenty-front:lingui:compile
|
|
```
|
|
|
|
### تجربة
|
|
|
|
```bash
|
|
npx nx run twenty-front:test # run jest tests
|
|
npx nx run twenty-front:storybook:serve:dev # run storybook
|
|
npx nx run twenty-front:storybook:test # run tests # (needs yarn storybook:serve:dev to be running)
|
|
npx nx run twenty-front:storybook:coverage # (needs yarn storybook:serve:dev to be running)
|
|
```
|
|
|
|
## "التقنية المستخدمة"
|
|
|
|
"المشروع يحتوي على تقنية بسيطة ونظيفة، مع الحد الأدنى من كود البويلر بليت."
|
|
|
|
"**التطبيق**"
|
|
|
|
- "[React](https://react.dev/)"
|
|
- "[Apollo](https://www.apollographql.com/docs/)"
|
|
- "[GraphQL Codegen](https://the-guild.dev/graphql/codegen)"
|
|
- "[Recoil](https://recoiljs.org/docs/introduction/core-concepts)"
|
|
- "[TypeScript](https://www.typescriptlang.org/)"
|
|
|
|
"**الاختبار**"
|
|
|
|
- "[Jest](https://jestjs.io/)"
|
|
- "[Storybook](https://storybook.js.org/)"
|
|
|
|
"**الأدوات**"
|
|
|
|
- "[Yarn](https://yarnpkg.com/)"
|
|
- "[Craco](https://craco.js.org/docs/)"
|
|
- "[ESLint](https://eslint.org/)"
|
|
|
|
## "الهيكلية"
|
|
|
|
### "التوجيه"
|
|
|
|
"[React Router](https://reactrouter.com/) يتعامل مع التوجيه."
|
|
|
|
"لتجنب [إعادة العرض](/l/ar/developers/frontend-development/best-practices-front#managing-re-renders) غير الضرورية، يوجد منطق التوجيه في `useEffect` في `PageChangeEffect`."
|
|
|
|
### "إدارة الحالة"
|
|
|
|
"[Recoil](https://recoiljs.org/docs/introduction/core-concepts) يتعامل مع إدارة الحالة."
|
|
|
|
"راجع [أفضل الممارسات](/l/ar/developers/frontend-development/best-practices-front#state-management) لمزيد من المعلومات حول إدارة الحالة."
|
|
|
|
## "الاختبار"
|
|
|
|
"[Jest](https://jestjs.io/) يعمل كأداة لاختبار الوحدات بينما يعمل [Storybook](https://storybook.js.org/) لاختبار المكونات."
|
|
|
|
"يستخدم Jest بشكل رئيسي لاختبار دوال الأدوات وليس المكونات نفسها."
|
|
|
|
"Storybook لاختبار سلوك المكونات المعزولة، وكذلك عرض نظام التصميم."
|
|
|