{"id":25858,"library":"laux-compiler","title":"laux-compiler","description":"LAUX is a superset of Lua that transpiles to standard Lua, adding syntax sugar such as fat/thin arrow functions, decorators, real-time type checking, import/export statements, spread operators, and null-conditional operators. This package (v1.6.0) is a fork of the now-dead LAU project by Metamist, aiming to revitalize it with syntax and functionality changes. It is published on npm and used via a CLI tool (lauxc) after global installation. Release cadence is irregular; the package is actively maintained by the fork author. Key differentiators include workspace configuration files for merging multiple input files, decorators for function mutation, and compile-time type checking (with a performance caveat). It is primarily used in the Garry's Mod Lua ecosystem.","status":"active","version":"1.6.0","language":"javascript","source_language":"en","source_url":"https://github.com/8char/laux-compiler","tags":["javascript","transpiler"],"install":[{"cmd":"npm install laux-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add laux-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add laux-compiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is a CLI tool, not a library. Install globally and run via terminal.","wrong":"Using require('laux-compiler') in Node.js code","symbol":"CLI","correct":"npm i -g laux-compiler && lauxc watch ./laux ./lua"},{"note":"Workspace config enables merging and advanced options.","wrong":"Running lauxc without workspace config expecting default behavior","symbol":"Workspace config","correct":"Create lauxconfig.json in root folder and run lauxc workspace"},{"note":"-r flag triggers merges defined in lauxconfig.json.","wrong":"Using -r flag without workspace config","symbol":"Release mode","correct":"lauxc workspace -r"}],"quickstart":{"code":"npm i -g laux-compiler\nmkdir myapp && cd myapp\nmkdir laux lua\necho 'local greet = (name) => print(\"Hello, \" .. name) end' > laux/hello.laux\nlauxc watch ./laux ./lua\ncat lua/hello.lua","lang":"typescript","description":"Installs the CLI globally, creates input/output directories, writes a LAUX file with a fat arrow function, transpiles it, and prints the resulting Lua code."},"warnings":[{"fix":"Use type checking only for development or non-hot paths, or disable it in production builds.","message":"Real time type checking should not be used in performance-critical code that runs every frame (e.g., in Garry's Mod hook callbacks).","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Define a decorator that internally chains multiple behaviors.","message":"Only one decorator per function is allowed. To combine multiple, you must create a single wrapper decorator.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use fat arrow (=>) if explicit 'self' is not desired, or ensure the function signature accounts for 'self'.","message":"Arrow functions with thin arrow (->) automatically add 'self' as the first argument, which can lead to unexpected parameters if not accounted for.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Refer to laux-compiler docs instead of LAU docs.","message":"The original LAU project is dead; this fork may have incompatible syntax changes. Check the fork's documentation for differences.","severity":"deprecated","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm i -g laux-compiler' to install globally.","cause":"Package not installed globally or locally.","error":"Error: Cannot find module 'laux-compiler'"},{"fix":"Ensure npm global bin directory is in your PATH, or run using 'npx lauxc'.","cause":"Global npm binaries not in PATH.","error":"lauxc: command not found"},{"fix":"Create a 'lauxconfig.json' file in the root folder of your project.","cause":"Running 'lauxc workspace' without config file in current directory.","error":"Error: lauxconfig.json not found"},{"fix":"Ensure type annotations match actual usage; disable type checking in production if not needed.","cause":"Using real-time type checking on a non-function or mismatched type annotation.","error":"TypeError: ... is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}