Releases: XorTroll/Brew.js
First stable release - biggest update!
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 bysdl
, now using SDL2 rendering - System module
device
replaced bynx
- 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
andstdlib
. - 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
- Modules must be called by
- 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) andmain
(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.
- Now projects are identified by folders which have a
- 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; andBrew::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.
Graphic update!
Using the interpreter
Just copy the Brew.js.nro
ROM to your SD card, no matter the location.
Remember that Brew.js searches for projects at sdmc:/switch/Brew.js
!
Change Log:
-
The UI has been improved, and it doesn't require those attached files from the 0.2 release.
-
All the graphic system has been updated, adding lots of features. Too many functions and elements to talk about... Now games can be easily made using Brew.js API!
-
Now the result of an execution is not just saved, now it's also displayed in the screen. (it might give some problems due to large results)
-
The examples have been updated according to this version's API, and some new examples were added. Wow! A
PONG
example to see how graphics work! (despite it's very poor)
Important!
If you have any projects with the previous API, read the documentation carefully and update it, because a few functions are deprecated or their names have been changed.
Second beta release!
Using the interpreter
Just copy the switch
folder to your SD card (sdmc:/switch
).
In this version Brew.js requires some extra files, so copy everything, not just the NRO ROM.
Change Log
Wow, it's been just two days and a lot of changes have been done:
-
New UI! No more console, now beautiful backgrounds.
-
Some new functions and vars added, check the API guide. (README.md file)
-
Console printing has been disabled due to problems with graphics.
-
Result saving! When a project's execution finishes, it's output is saved to a log file.
If it gets an error while executing, the project exists and the error's output is saved to the log file. -
Three new examples were added, and the Hello World one was updated according to the new API.
Important!
If you have any projects with the previous API, read the documentation carefully and update it, because a few functions are deprecated or their names have been changed.
First release
You can check the documentation given in the rar file for API info.
Enjoy scripting!