programs test
This commit is contained in:
parent
cda6f727f6
commit
e0b5c4b2ea
4 changed files with 31 additions and 1 deletions
19
programs.js
Normal file
19
programs.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
for (let path of itty.env.path) {
|
||||
path = fs.listDir(path)
|
||||
for (let p in path) {
|
||||
p = path[p]
|
||||
if (p.ext === "js") {
|
||||
const name = p.name.slice(0, -3)
|
||||
if (itty.cursorX + name.length >= itty.width) {
|
||||
itty.cursorX = 0
|
||||
itty.cursorY++
|
||||
}
|
||||
while (itty.cursorY >= itty.height)
|
||||
display.lift()
|
||||
display.buffer(name + " ")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
display.render()
|
||||
quit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue