-
Notifications
You must be signed in to change notification settings - Fork 4
Compiling a bundle from command line
The jbb npm module contains the jbbc utility that you can use to compile your source bundles:
npm install -g jbb
A jbb bundle contains serialized javascript data structures. This means that they must first be loaded in memory before dumped in the file. The jbb compiler can help you on this task.
In order for the compiler to know how to handle your resources, you will need to specify a particular jbb profile. Each profile contains a Table of Known Objects, along with parsing and encoding instructions for the compiler.
In case of a three.js project, you can use the jbb-profile-three:
npm install -g jbb jbb-profile-three
This will make the jbb compiler and the jbb-profile-three available to your system. You can then compile your bundles like so:
jbb -p three -o mybundle.jbb /path/to/mybundle.jbbsrc
Note that the files passed to the jbb compiler must be supported by the profile, otherwise you will get errors. For more details have a look on your profile description, for example of jbb-profile-three.