Necessary Package Manager

    grandma3-tstl-plugin
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.2 • Public • Published

    grandMA3 TypeScriptToLua Plugin

    a TypeScriptToLua plugin that allows for direct export to grandMA3 compatible Lua files

    install

    git clone https://github.com/LightYourWay/grandMA3-tstl-plugin.git && \
    cd <your-plugin-folder> && \
    npm link ../grandMA3-tstl-plugin

    integrate into tsconfig.json

    {
        "tstl": {
            "luaPlugins": [
                { "name": "grandMA3-tstl-plugin/fix_export.ts" }
            ]
        }
    }

    usage example

    // ****************************************************************
    // plugin main entry point 
    // ****************************************************************
    local function Main(display_handle: number, argument: any) {
    
    }
    
    // ****************************************************************
    // plugin exit cleanup entry point 
    // ****************************************************************
    local function Cleanup() {
    
    }
    
    // ****************************************************************
    // plugin execute entry point 
    // ****************************************************************
    local function Execute(Type: string, ...args: any[]) {
    
    }
    
    // ****************************************************************
    // return the entry points of this plugin
    // ****************************************************************
    export = [Main, Cleanup, Execute]

    transpiles to:

    local function Main(display_handle, argument)
    end
    
    local function Cleanup()
    end
    
    local function Execute(Type, ...)
    end
    
    return Main, Cleanup, Execute

    Keywords

    none

    Install

    npm i grandma3-tstl-plugin

    DownloadsWeekly Downloads

    2

    Version

    0.2.2

    License

    MIT

    Unpacked Size

    5.29 kB

    Total Files

    7

    Last publish

    Collaborators

    • lukas-runge