Skip to main content

ShonaScript Chii?

Not yet Revised

ShonaScript i programming language inokubatsira kuti udzidzire kunyora code ne shona, kana usati wambonyora code zvachose.

tsananguro

programming language - i language inonzwisiswa ne computer

code - ma words, ma numbers, kana ma special characters akaita se ma brackets aya "{},()" anoshandiswa mu programming language

shona - i language inoshandiswa ne mamwe ma Zimbabweans pakutaura

Zvii zvinodiwa?#

Kuti ugone kutanga kunyora code ne ShonaScript, panodiwa:

  1. Phone kana Computer πŸ’» - yekunyorera code
  2. Internet 🌍 - inongodiwa pakudownloader ma files nezvimwe zvaunozoshandisa

Tanga Pano πŸ‘‡πŸΎ#

ShonaScript Application#

Unokurudzirwa kushandisa application ye ShonaScript inowanikwa ku https://www.shonascript.app/. Application iyi inonzi Progressive Web Application, zvichireva kuti unogona kui downloader kana kuita add to home screen yoshanda kunge application yemuphone. Kana uchinge wave ne application iyi, jamba zve VS Code zviri pazasi apa. Uende ku topic yema variables

VS Code, NodeJS setup#

Kana usiri kuda kushandisa application, unogona kushandisa VS code ne zvimwe mu computer. Teedzera masteps aya anodiwa kuti ugone kushandisa ShonaScript mu VS Code. Kana uchida kubatsirwa, unokurudzirwa kutaura mugroup re whatsapp

STEP 1: Node JS#

Download Node JS

Unofana kudownloader software inonzi Node JS kana usati wamboidownloader. Node JS inogona kukura zve 55MB

  1. Enda ku https://nodejs.org/en/download/, wo downloader Node JS inoenderana ne computer yaunoshandisa. Unoona paine windows, kana macOS

Unogona kuona video riripazasi apa kana uchikwanisa. Video iri harina kugadzirwa nesu, asi kana usiri kunzwisisa zvikuitika, bvunza mu group re whatsapp

  1. Kana uchishandisa Windows unoenda mu command prompt, kana uchishandisa macOSunoenda mu terminal:

    1. Enda mu command prompt / terminal
    2. Nyora kuti node -v
    • unofana kuona nhamba inotanga na "v" sokuti v16.13.1
    • kana usiri kuona nhamba iyi, unogona kuvhara command prompt/terminal, oivhura oedza zvekare kuti node -v
    • kana usati waakuona nhamba, zvinoreva kuti hauna kugadzira NodeJS zvakanaka, saka taura mu group rewhatsapp, ubatsirwe.
  2. Paku installer Node JS, chingobaya continue kana next kusvika waaku installer. Usachinje chinhu.

STEP 2: VS Code#

Uchashandisa VS Code kunyora code yako. Usashandise imwe editor kunze kwe VS Code, nekuti VS Code ndiyo inokwanisa kuona ShonaScript.

Download VS Code

VS Code inogona kukura zve 171MB

  1. Enda ku https://code.visualstudio.com/, wo downloader VS Code inoenderana ne computer yaunoshandisa

Unogona kuona video iri kana uchikwanisa:

STEP3: Gadzira Folder "shonascript"#

Gadzira Folder reShonaScript
  1. Enda mudesktop folder mako, ogadzira folder rakanzi shonascript
  2. Vhura VS Code, woenda pamusoro pakanzi file
  • chienda pakanzi Open Folder, wotsvaga folder rako rawagadzira mu desktop rakanzi shonascript
  1. Kana pakabuda pakanzi do you trust the authors, unoti yes

Step 4: ShonaScript#

tip
  1. mu VS Code, enda pama extensions:

Onyora mu search box kuti ShonaScript, unofana kuona ShonaScript semu picture iri pamusoro apa. Wa downloader inonzi syntax highlighter apa.

  1. vhura terminal mu VS Code
  • Unofana kuona terminal pasi pescreen rako
  1. Mu terminal:

    • nyora kuti npm i shona -g, wobaya enter
    • kana ukaona mu terminal makanzi npm ERR, ne red, edza kunyora: sudo npm i shona -g, wobaya enter
    • chinonzi shona ndicho chinokubatsira kugadzira mafiles anodiwa
  2. Mu terminal:

    • nyora kuti shona hesi wobaya enter
    • unofana kuona izvi mu terminal :
  1. Ukatarisa mu folder rako rawagadzira riya mu VS Code, unofana kuona kuti ShonaScript yagadzira mafiles 4:

    • index.shona - ndomauchanyora code
    • index.js - usanyore chinhu umu
    • shona.js - usanyore chinhu umu
    • package.json - usanyore chinhu umu
  2. Mu terminal zvekare, nyora kuti npm i shonascript, wobaya enter

    • Unofana kuona mu folder rako rave ne zvinhu izvi:
      • folder rakanzi node_modules, usaribate
      • file rimwe rakanzi package_lock.json, usaribate
  3. Chipinda mu file rakanzi index.shona, unofana kuona pazasi mu VS Code makanzi Shonascript seizvi:

  • izvi ndizvo zvinoreva kuti waakukwanisa kushandisa ShonaScript
  1. Mu index.shona, dzima line 1 wonyora kuti nyora("Goodluck Zimbabwe") pa line 1 ipapo

  2. Mu terminal, nyora kuti node shona.js, wobaya enter. Unofana kusaona ma line e red mu terminal kana code yako ichishanda.

  3. Mu terminal, nyora kuti node index.js, wobaya enter. Unofana kuona muterminal imomo makanzi Goodluck Zimbabwe.


MakorokotoπŸŽ‰, wanyora code yako yekutanga ne ShonaScriptπŸ‡ΏπŸ‡Ό

Chienda kumberi udzidze kuti code yemu ShonaScript inonyorwa sei