Skip to content

TechHog8984/luau_beautifier

Repository files navigation

Luau Beautifier

A beautifier for Luau written in C++

Build

In order to build, you need to have Lune installed.
I personally recommend installing through cargo if you already have rust installed.

Build

$ lune run build silent

Build (web assembly)

$ lune run build silent wasm

Usage

Usage: ./luau-beautifier [options] [file]

options:
  --minify: switches output mode from beautify to minify
  --nosolve: doesn't solve simple expressions
  --ignoretypes: omits Luau type expressions, keeping the important parts
  --replaceifelseexpr: tries to replace if else expressions with statements
  --extra1: tries to replace certain statements / expression using potentially dangerous methods

If there are errors parsing (both CLI options or the input code), you will see those in stderr.
Otherwise, the beautified code will appear in stdout.

Replit

You can use luau_beautifier without compiling with this replit.

Other notes

  1. The Luau version used is 0.630
  2. Currently there is MINIMAL typing support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages