1.0.6 • Published 3 months ago

joscriptjs v1.0.6

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago
npx joscriptjs create my-app

المكتبه بتشتغل بفكره Api Route وDynamic Routes يعني بكل بساطه لو انت عندك اكثر من صفحه محتاج تتنقل ما بينهم مش محتاج تعرف مسارات يدويا كل اللي عليك انك هتيجي جوه فولدر app داخل المشروع وهتعمل فولدر باسم الصفحه اللي انت عايز تروح لها وداخل الفولدر ده هتعمل ملف page.js واجباري لازم يكون اسمه page.js عشان يشتغل والمكتبه ايضا بتدعم فكره layout يعني انت مثلا لو عندك navbar وعايز تعرضه في كل الصفحات اللي هتكون في المشروع مش محتاج تنادي عليه اكثر من مره عشان يظهر في كل الصفحات كل اللي عليك انك هتعمل ملف اسمهlayout.js وهتحط جواه ال navbar بتاعك او الحاجه اللي انت عايزها تظهر في كل الصفحات وهو اوتوماتيك هيضيف الحاجه دي في كل الصفحات

function App() {

return(
    jo('div', {class:'app ', id:'app' ,children:[

        jo('h1', {t:'Welcome to joscript'}),
       
    ]})
)

} export default App;

<h1>Joscript features</h1>
<p>Here are some of the plugins that the Joscript library offers </p>
<p>فيما يلي بعض المكونات الإضافية التي توفرها مكتبة جوسكريبت </p>
<div>
 <p>1 -create item by jo script</p>
 
 ```jsx
 // Create item
 jo('h1', {id:'h1', class:'h1', t:'welcome to joscript'}),
  // add text 
  jo('h1', { t:'welcome to joscript'}),
  
jo('div', {children:[]}),

jo('div', {
  children: [

    jo("h1", { t: "welcome to joscript", class: 'title' }),
    jo("img", { src: "/joscript-logo.png", id: 'jo', width: "150px" }),

  ]
})

If you have a div element for example, and you want to add other elements inside it, you just go into the object and add something called children, and this takes you an array [], and inside the array, you will put your elements in the same way.

لو عايز تضيف ستايل على العنصر بكل بساطه وهتعرف حاجه اسمها style جوه الاوبجكت وتدي لها الاستايل اللي انت عايزه او ممكن تمرر قيمه تالته للفنكشن واللي هي هتكون عباره عن اوبجيكت وتقدر جواه تحط الأستايل زي المثال

لو عايز اضيف حدث على العنصر زي onclick أو onmousemove أو onmouseover او اي حدث انت عايزه هتيجي جوه الاوبجيكت وتكتب اسم الحدث اللي انت عايز تنفذه

If you want to add an event to the element like onclick, onmousemove, onmouseover, or whatever event you want, you go inside the object and type the name of the event you want to execute.

1.0.6

3 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago