كيف يمكنني إنشاء إضافات Discourse الخاصة بي؟

Hi, I want to make my own discourse plugins and what languages I need to know and what tools/programs/apps I need to do so. I appreciate it.

إعجابَين (2)

لقد بدأت للتو، ولكن إليك ‘بدايتي’ لمساعدتك على الانطلاق:

اقرأ:

  • هذه
  • هذه
  • حاول قراءة الكود في أبسط والمقالات الشائعة وراجع ما إذا كان بإمكانك فهم وظيفتها (ليس هذا أمرًا سهلاً دائمًا، خاصة مع تعقيد التعامل مع ملفات متعددة والبساطة الوظيفية القاسية أحيانًا في جافا سكريبت، لكن استمر في المحاولة)

تحتاج إلى تعلم:

  • الكثير من جافا سكريبت (لا تبحث أبعد من مقاطع الفيديو الممتازة والممتعة (!) لـ @mpj في Fun Fun Function (شكرًا لك يا صديقي!))
  • الكثير من Ember وقليل من Ruby (ابدأ من هنا)
  • Github و Git
  • (و HTML/CSS بالطبع!)

قم بتثبيت:

27 إعجابًا

I appreciate it! What “kind” of JavaScript, like web or node.js?

ECMAScript. It’s used in both ‘places’.

Would I just make a new atom file named plugin.js and work on a plugin there?

No. There are no ‘.js’ files. JavaScript is mainly stored in ‘.js.es6’ files. Ruby in ‘.rb’ files. It’s more complex. Take a look at existing plugins for example file arrangement and content. You need to understand serialisation, Ember templates, the Router and the Model, View, Controller concept.

I would highly recommend you install a simple existing plugin of your choice and try modify it in some sensible way.

Dont skip on the reading.

I think it’s fair to say is a pretty steep learning curve because there are a lot of concepts to get to grips with, two languages, one framework and Discourse’s ‘way of doing things’ …

4 إعجابات