Git Product home page Git Product logo

luajoin's Introduction

luajoin

A program (now abandoned) that allows multiple lua files to be joined together into a single bundle. Previously used to learn more on Rust, and to develop single-file scripts, I am but no longer doing that anymore, so I am making this repository public.

JSON files are also supported.

Installation

Download the binary from the releases page, and place it in your path.

Lua Usage

Each file is structured as modules. You can use relative and absolute paths to import modules.

Features

  • JSON and Lua module imports
  • Supports relative and absolute paths
  • Supports 'require(script.Parent. [...])' syntax
  • Can use luau types, will be removed on compilation

Used nicely with Roblox LSP

Example

file: main.lua

local text = _require("text") -- could also be ./text, since it's in the same dir
print(module:getText())

file: text.lua

local text = {}
function text:getText()
    return "Hello, World!"
end

return text

JSON files will automatically be converted to lua tables.

CLI Usage

Creating a project

This will prompt you for the project's configuration, and create the appropriate file and folders.

luajoin init

Development

This will watch for file changes in your source folder and automatically rebuild the bundle. It is a really fast process, as files are cached.

luajoin serve

Deployment

A longer process, as optimizations are applied to the bundle. This is the command you should use when deploying your project.

luajoin build

luajoin's People

Contributors

jxl-s avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.