2de681da72
Created by Github action <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/22317?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> Co-authored-by: github-actions <github-actions@twenty.com>
92 lines
2.6 KiB
Plaintext
92 lines
2.6 KiB
Plaintext
---
|
|
title: أوامر الواجهة الأمامية
|
|
icon: terminal
|
|
---
|
|
|
|
## الأوامر المفيدة
|
|
|
|
### "بدء التطبيق"
|
|
|
|
```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
|
|
```
|
|
|
|
### Lint
|
|
|
|
```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)"
|
|
* [Jotai](https://jotai.org/)
|
|
* "[TypeScript](https://www.typescriptlang.org/)"
|
|
|
|
**الاختبار**
|
|
|
|
* [Jest](https://jestjs.io/)
|
|
* "[Storybook](https://storybook.js.org/)"
|
|
|
|
**الأدوات**
|
|
|
|
* [Yarn](https://yarnpkg.com/)
|
|
* "[Craco](https://craco.js.org/docs/)"
|
|
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
|
|
|
|
## "الهيكلية"
|
|
|
|
### "التوجيه"
|
|
|
|
"[React Router](https://reactrouter.com/) يتعامل مع التوجيه."
|
|
|
|
لتجنب غير ضروري [re-renders](/l/ar/developers/contribute/capabilities/frontend-development/best-practices-front#managing-re-renders) كل منطق المسارات في 'useEffect' في 'PageChangeEffect'.
|
|
|
|
### "إدارة الحالة"
|
|
|
|
[Jotai](https://jotai.org/) يتعامل مع إدارة الحالة.
|
|
|
|
"راجع [أفضل الممارسات](/l/ar/developers/contribute/capabilities/frontend-development/best-practices-front#state-management) لمزيد من المعلومات حول إدارة الحالة."
|
|
|
|
## "الاختبار"
|
|
|
|
"[Jest](https://jestjs.io/) يعمل كأداة لاختبار الوحدات بينما يعمل [Storybook](https://storybook.js.org/) لاختبار المكونات."
|
|
|
|
"يستخدم Jest بشكل رئيسي لاختبار دوال الأدوات وليس المكونات نفسها."
|
|
|
|
"Storybook لاختبار سلوك المكونات المعزولة، وكذلك عرض نظام التصميم."
|