-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from TeaByte/development
Development
- Loading branch information
Showing
6 changed files
with
102 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
<div dir="rtl"> | ||
|
||
## مستندات المساهمة متاحة هنا: <https://nakhlahjs.site/contribute>. | ||
<!-- ## مستندات المساهمة متاحة هنا: <https://nakhlahjs.site/contribute>. --> | ||
# مقدمة | ||
|
||
نحن مطورين نخلة جي أس لا زلنا نعتبر مشروعنا صغير و متواضع. نحن نرحب بالمساهمات من الجميع. يمكنك المساهمة بطرق مختلفة مثل: | ||
|
||
- إبلاغنا عن الأخطاء والمشاكل عن طريق فتح مشكلة في خانة المشاكل. | ||
- إقتراح تحسينات أو ميزات جديدة عن طريق خانة المناقشة. | ||
- إرسال طلب دمج لتحسينات أو ميزات جديدة (من فضلك تأكد من أن الكود يتوافق مع الأسلوب والمعايير المستخدمة في المشروع).<br> | ||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change and make sure to follow the coding style and standards used in the project. | ||
|
||
## الأسلوب والمعايير | ||
- يجب أن يكون الكود نظيف ومنظم. | ||
- يجب أن يكون الكود مكتوب بأسلوب متسق. | ||
- يجب أن يكون الكود معتمد على الأساليب الحديثة والمعايير الجديدة. | ||
- يجب أن يكون الكود مكتوب بأسلوب يسهل فهمه وصيانته. | ||
- يجب أن يكون الكود مكتوب بأسلوب يسهل توسيعه وتطويره. | ||
- يجب أن يكون الكود مكتوب بأسلوب يسهل اختباره. | ||
- يجب أن تكتب الوثائق بأسلوب يسهل فهمه واستخدامه -commenting-. | ||
|
||
## الأمان | ||
- يجب أن يكون الكود آمن ومحمي من الثغرات والهجمات. | ||
- يجب أن يكون الكود محمي من الثغرات الشائعة والهجمات الشائعة. | ||
|
||
# الخطوات | ||
1. قم بعمل Fork للمشروع. | ||
2. قم بعمل Clone للمشروع إلى جهازك. | ||
3. قم بتنصيب الأدوات والمكتبات المطلوبة. | ||
4. قم بتطوير الكود المطلوب. | ||
5. قم بإرسال طلب دمج. make a pull request to the original repository to development branch. | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
if ("serviceWorker" in navigator) { | ||
navigator.serviceWorker.register("/JavaScript/sw.js", { | ||
navigator.serviceWorker.register("/sw.js", { | ||
type: 'module' | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// const CACHE_NAME = 'cache-v1'; | ||
// const no_cache_urls = [ | ||
// "/sw-cache.json", | ||
// ] | ||
// self.addEventListener('install', function (event) { | ||
// event.waitUntil( | ||
// () => { | ||
// const cacheNames = caches.keys(); | ||
// Promise.all( | ||
// cacheNames.map(function (cacheName) { | ||
// if (cacheName !== CACHE_NAME) { | ||
// return caches.delete(cacheName); | ||
// } | ||
// }) | ||
// ); | ||
// cacheNewResources() | ||
// } | ||
// ); | ||
// }); | ||
|
||
// self.addEventListener('activate', function (event) { | ||
// event.waitUntil( | ||
// caches.keys().then(function (cacheNames) { | ||
// return Promise.all( | ||
// cacheNames.map(function (cacheName) { | ||
// if (cacheName !== CACHE_NAME) { | ||
// return caches.delete(cacheName); | ||
// } | ||
// }) | ||
// ); | ||
// }).then(function () { | ||
// return cacheNewResources(); | ||
// }) | ||
// ); | ||
// }); | ||
|
||
// async function cacheNewResources() { | ||
// const resp = await fetch('/sw-cache.json'); | ||
// const data = await resp.json(); | ||
// const cache = await caches.open(CACHE_NAME); | ||
// await cache.addAll([...data, "/", "/offline", "/courses"]); | ||
// } | ||
|
||
// self.addEventListener('fetch', function (event) { | ||
// const url = new URL(event.request.url).pathname | ||
// if (no_cache_urls.includes(url)) { | ||
// event.respondWith(fetch(event.request)); | ||
// } else { | ||
// event.respondWith( | ||
// caches.match(event.request).then(function (response) { | ||
// if (response) { | ||
// return response; | ||
// } else { | ||
// if (event.request.method === 'GET') { | ||
// return fetch(event.request).then(function (response) { | ||
// return caches.open(CACHE_NAME).then(function (cache) { | ||
// cache.put(event.request, response.clone()); | ||
// return response; | ||
// }); | ||
// }); | ||
// } else { | ||
// return fetch(event.request); | ||
// } | ||
// } | ||
// }) | ||
// ); | ||
// } | ||
// }); |