Engine 0.0.4
Game engine in lua
Loading...
Searching...
No Matches
bundler.lua File Reference

Go to the source code of this file.

Functions

local function build (src_path, src_filename, dest)
 unify files
 

Function Documentation

◆ build()

local function build ( src_path ,
src_filename ,
dest  )

unify files

groups code into a single source

Parameters
[in]src_pathfolder with lua includes
[in]src_fileentry file
[in]dest_filepackaged file output
Input
  • lib_common_math.lua
    local function sum(a, b)
    return a + b
    end
    local P = {
    sum = sum
    }
    return P
  • main.lua
    local os = require('os')
    local zeebo_math = require('lib_common_math')
    print(zeebo_math.sum(1, 2))
    os.exit(0)
    local function require(std, game, application)
    local function exit(self)
    local os
    Definition main.lua:1
Output
  • main.lua
    local os = require('os')
    local lib_common_math = nil
    local function main()
    local zeebo_math = lib_common_math()
    print(zeebo_math.sum(1, 2))
    os.exit(0)
    end
    lib_common_math = function()
    local function sum(a, b)
    return a + b
    end
    local P = {
    sum = sum
    }
    return P
    end
    local function main()