Jump to content

[Lua] [Tool] CLI for Dual Universe Lua Scripting


Wolfram

Recommended Posts

Hello, noveans! õ/

Today I bring you a project I've been working on for a while now, that intends on making Lua development quicker and more organized!

 

About:

This tool was initially built as a wrapper around hdparm's excellent wrap.lua script, which among many things allowed developing scripts outside DU, automating the creation of JSON config files, making events easier to work with, etc, and eventually evolved into a tool on its own.

Basically, the CLI is a small command-line that allows you to create Lua projects from all sizes and shapes, be it a simple greeting script up or a multi-project system.

 

Main Features:

- Support for Lua scrpts with code distributed over multiple files, accessible via require statements, also supports multiple entry-points per project (multiple PBs or render scripts)

- Support for importing of external packages via the CLI or from LUA_PATH

- Support for render scripts

- Support for minification and (experimental) compression

- Support for code completion (intellisense) on Visual Studio Code and IntelliJ Idea, requires EmmyLua installed in both cases

- Element link management built-in, allows you to indicate what each of the linked elements should be named as and its type

- Autoconfig export in JSON, YAML and CONF formats

- Syntax checks at compilation time

- Optional helpers for linked element management, etc

 

Website / Documentation / Source-code:

https://github.com/wolfe-labs/du-luac

 

Requisites and Installation:

- You will need to have the Node.js runtime installed! Version 16 LTS is recommended.

- For some functions to work, it's ideal to have Git installed too. Lua is optional.

- Install via the command: npm i -g @wolfe-labs/du-luac

- After installing, you should be able to run the CLI via the command: du-lua

Link to comment
Share on other sites

I'm the biggest fan of this tool :D

 

I've been using it for quite a while now and it makes things so much easier; you can concentrate on your code instead of fighting the tooling required to make the code run in DU.

 

Thank you so much @Wolfram for making this tool.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...