Bundling

Fry has an integrated bundling tool for FatScript code.

Usage

To bundle your project into a single file from the entry point, use the following command:

fry -b sweet mySweetProject.fat

This process includes all imports (except literal paths) and removes any unnecessary blank spaces from the combined code, which speeds up the load time. Additionally, the bundling process:

  • Prepends a shebang to the bundled code
  • Sets the file mode with execute attribute

You can then run your program from the shell:

./sweet

Obfuscating

Optionally, you can obfuscate the content of your bundle by using -o:

fry -o sweet mySweetProject.fat  # creates the obfuscated bundle
./sweet                          # runs your program the same way

if you are distributing code through a public host, you could set a custom key using a local .fryrc that only the client knows, to protect the source

Obfuscation uses zCode to encode, which should be reasonably fast to decode. However, if there is no reason to use it, -b should have better load time.

results matching ""

    No results matching ""