Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

First stable release - biggest update!

Latest
Compare
Choose a tag to compare
@XorTroll XorTroll released this 01 Jul 16:55
· 41 commits to master since this release
6c9a335

Dunno how to start? Read this!

ChangeLog of this huge version

  • UI improved:
    • New dark blue theme, all graphics updated
    • Main font changed from Tahoma to Roboto
    • Use ZL and ZR to move between project blocks
    • Use D-pad or joysticks to move between projects
    • Select projects by A button or touching them
    • Use L or R to display help
    • Use + or - to exit to hbmenu
  • Brand, new remade API: (read documentation)
    • Modules must be called by require function, Node-style
    • Graphics module gfx replaced by sdl, now using SDL2 rendering
    • System module device replaced by nx
    • Global vars __dirname and __filename added (only if the source is loaded from a file)
    • Some Node modules were partially added: fs, os, path, process (more will be added)
    • New modules have been added, to port some basic C and C++ elements, which are stdio and stdlib.
    • Within sdl module, audio support has been added because SDL2 supports audio: MP3, OGG, FLAC and WAV files can be played!
    • More specific API stuff can be checked within the documentation
  • Projects have also been changed:
    • Now projects are identified by folders which have a package.json file inside, like Node and NPM do.
    • Those JSON files should have this attributes: name (the project's name), version (the project's version), description (the project's description) and main (the entry source file to load, doesn't need to be *.js anymore).
    • If the project doesn't have the JSON file, it won't be shown in the interpreter.
  • Can I use Brew.js API on my C/C++ homebrew app? Yes!
    • Brew.js API's C++ core has been completely remade, so it can now be embedded with other C/C++ projects.
    • IMPORTANT: You must have it's JS libraries stored somewhere, so that Brew.js accesses them. In this interpreter's case, they're stored inside RomFS ("romfs:/Lib").
    • Brew.js API searches there by default, so I recommend storing them there. Don't worry about RomFS, when Brew.js API is initialized it automatically enabled RomFS support, and disables it when it's exited.
    • Brew.js API doesn't need a documentation, as it's main header ("Brew.js/Brew.js.h") only has 4 functions: Brew::Init(string Path), which initializes Brew.js API with given library path ("romfs:/Lib" by default); Brew::Exit(), which exits Brew.js API's services, Brew::Evaluate(string Source), which evaluates JS source and returns the result as a string; and Brew::EvaluateFile(string Path), which does the same as the previous function but from a source file, adding __dirname and __filename global vars. Enjoy embedding Brew.js API!
  • Yay, new examples!
    • There are some new examples, as always, but this time there are even more. (audio player, simple notepad...)
    • Obviously, all the examples have been updated to be useful with the new API.