npm install jspicl --save
By default, jspicl formats the LUA output for you but if performance ever becomes an issue you can turn this off through the options argument.
const output polyfills = ;
|customMappers||HashMap<string, function>||Custom handlers for transpiling expressions, declarations or statements.|
|polyfills||object||Table of required polyfills with their corresponding lua code.|
jspicl does not support all expressions or statements out of the box but it is
extensible enough to allow for these to be added. It also allows existing ones to
be replaced if the implementation is considered unsatisfactory.
This is done by supplying a
customMappers option. The only requirement imposed on AST node is that they contain a string property called
type since this is used to identify the appropriate declaration, expression or statement.
const customMappers =// Replace the default while-statement implementation`while do-- We have full control of the output!end`// Add support for throw statements`assert(true, )`// ...;const output = ;
rollup-plugin-jspicl - Rollup plugin wrapper for jspicl
games - Games created with jspicl
|ES2015+||Not all ES2015+ features are supported. Run your code through a transpiler first such as bublé or babel.|
|prototype chains||Not supported|
|Array methods||Not all prototype methods have been polyfilled yet.|
|Math.max||Only supports two arguments.|
|AST||Not all declarations, expressions and statements have been implemented. More will be added as needed.|
This project uses semantic versioning