/ZeroBraneStudioLJS

Port of ZeroBraneStudio from lua to ljs

Primary LanguageTerraMIT LicenseMIT

ZeroBraneStudioLJS

Port of ZeroBraneStudio from lua to ljs

Here is the conversion so far of ZeroBraneStudio from Lua to LJS https://github.com/mingodad/ljs .

The process was (there is a ljs script to automate it check-diff.ljs):

for fn in *.lua; do lua2ljs $fn > ${fn/\.lua/\.ljs}; rm $fn; done 
  • Edit manually references of ".lua" to ".ljs"

  • Edit manually to remove duplicated declarations reported by running and errors reported by ljsc

ljsc -p -l -l fname_ljs > /dev/null 
  • Crate an alias for all lualibs/lexers/*.ljs because the lexlpeg expect files ending in ".lua":
for fn in *.ljs; do ln -s $fn ${fn/\.ljs/\.lua}
  • Edit the script zstudio.sh to use ljs and disable background to be able to see any error:
(cd "$DIR"; bin/linux/$ARCH/ljs src/main.ljs zbstudio -cwd "$CWD" "$@") #&
  • Add the ljs binaries in bin, in my case "bin/linux/x64" ljsjit ljs-51 and alias one of then to "ljs"

  • Run the script zstudio.sh to see it working

  • Fix errors reported and run "t/test.sh" and try fix anything reported