CLI Reference
Usage:
jspicl-cli input [<args>]
Arguments
-
--input: stringrequiredYour game's entry point. This file can then import other modules.
-
--output: stringrequiredWhere to output the PICO-8 cardridge.
-
--spritesheetImagePath: stringPath to a spritesheet file. Only PNGs are supported.
-
--cartridgePath: stringPath to an existing cardridge to reuse sound, music and state flags from. Normally you would point this to the generated cartridge so that you can save the assets directly and reuse them.
-
--includeBanner: boolean = trueInclude a short comment at the very top of the generated Lua code that contains info about jspicl. Does not increase the token count.
-
--jsOutput: stringWhere to output the flattened and transpiled JavaScript code. You may use this with astexplorer to inspect the AST. Make sure that Esprima is selected as the parser. Used for debugging purposes.
-
--luaOutput: stringWhere to output the transpiled Lua code. Used for debugging purposes.
-
--showStats: boolean = trueDisplay statistics about the generated cartridge. Useful for determining how much resources your game is using.
-
--pipeOutputToConsole: booleanOutput all console.log to terminal that launched PICO-8. For debugging purposes.
-
--reloadOnSave: booleanReload PICO-8 when the cartridge has been updated.
-
--customPicoPath: stringProvide a path to the PICO-8 executable if it's not installed in the default location.
-
--prettify: boolean = truePrettifies the transpiled code. By default, jspicl formats the Lua output for you but if performance ever becomes an issue you can turn this off by setting this to false.
-
--watchRuns the game in PICO-8 and reloads the cartridge when the source files change.
Watch mode
The CLI will listen for changes when the --watch option is passed.
This applies for the spritesheet aswell. Simply save your image and your changes will be reloaded in PICO-8.
NOTE: Reloading the cartridge is currently only supported on MacOS.