Log In  


Cart #pepper-5 | 2025-07-07 | Embed ▽ | License: CC4-BY-NC-SA
8

load #pepper

Pepper is a lua PrEPRocssing script that can help create different builds from the same code.

Source is under the MIT license at https://github.com/Werxzy/pepper.p64

Pepper works by looking through all the lua files in a loaded project and searches for specific labels, which can then be used to remove or add code before running or exporting. It takes 2 different forms: 1. A tool in the tooltray from which you can select an initial .pepper config file. 2. A terminal command. After running, you can type pepper into the terminal to get more info.

Pepper is useful for creating builds for debugging, full vs demo, or any other case that requires creating different versions. For me, I'm primarily made this for creating an empty example project for Picotron Solitaire Suite.

-- Example code

--#def debug true

-- leave the default path uncommented

--#if not debug
print("debug mode disabled")
--[[#else
print("debug mode enabled")
--#end]]

-- values are actually run as lua code in a fresh env.

--#def val debug and 1 or 2
-- similar to "val = debug and 1 or 2"

--#if val > 1
--[[#elseif val == 0
--#else
--#end]]

-- A .pepper file can also be created to state initial parameters
8


Updated pepper to run the current project within the terminal in the same way ctrl+r does.


Updated to version 1.1 as there was a bug where lua files in subdirectories were being ignored for preprocessing.


Updated to version 1.2 to use the click and drag widget installation and allow running lua scripts as a pepper command.



[Please log in to post a comment]