This guide assumes you have a fundamental understanding of the technologies involved, such as VS Code, scripting in Mudlet, and package creation in Mudlet. It is designed to provide a step-by-step approach to setting up your development, testing, building, and committing processes using GitHub, VS Code, and Mudlet, along with the tools Muddler and DeMuddler. Note that Muddler can be used with any text editor; however, this guide uses VS Code for illustration. If you prefer using VI or another editor, adapt these steps accordingly.
muddle-shadow
and Muddler.mpackage
. Download the latest release.Set up a new project on GitHub.
Clone the repository to your local machine.
Execute DeMuddler on your .mpackage
file to extract its contents. Example command:
de-muddler -f ThreshBuffs.mpackage
Copy the extracted files from the de-muddled package directory to your cloned GitHub repository.
Launch VS Code and open your cloned repository.
Edit your mfile
to ensure all values are set correctly, especially setting outputFile
from false
to true
to enable automatic package reloading in Mudlet:
outputFile = true
Add a .gitignore
file to exclude build artifacts and other unnecessary files from your repository:
# Ignore build directory and .output file
build/
.output
# Ignore any file starting with "muddle" in the project root directory
/muddle*
Create a symlink, batch file, or bash script to run Muddler. For VS Code users with Bash for Git, create an executable bash script named muddle
. This script calls Muddler and uses the -w
flag to watch and re-compile using Muddler every time there's a change in the source file. This file should be added to .gitignore
to avoid including developer-specific configurations in the repository:
#!/usr/bin/bash
/d/muddler/muddle-shadow-1.1.0/muddle-shadow-1.1.0/bin/muddle -w
To enable automatic recompilation and releases upon pushing to GitHub, add a workflow configuration file (release.yml
) under .github/workflows
. Refer to this gist for an example.
In Mudlet, add the Muddler.mpackage
.
In Mudlet, create a standalone script following the Muddler package. Refer to the Continuous Integration/Deployment with Muddler page or other sources for examples. My sample script.
Important: This script must be located after the Muddler package or it will not automatically reload in Mudlet.
Open the terminal in VS Code and run Muddler:
muddle
Verify everything works correctly, commit your changes to GitHub, and check if the build and deployment processes function as expected.
Following these steps will help you set up an efficient development environment integrating GitHub, VS Code, and Mudlet, leveraging Muddler and DeMuddler for streamlined package management and deployment.