Skip to content

Improve file exclusion system#6

Merged
Wolfyxon merged 5 commits intoWolfyxon:file-excludingfrom
VamatoHD:main
Aug 4, 2025
Merged

Improve file exclusion system#6
Wolfyxon merged 5 commits intoWolfyxon:file-excludingfrom
VamatoHD:main

Conversation

@VamatoHD
Copy link
Contributor

I was working on a game and needed a better way to exclude files from the final build, so I did the following adjustments to the program:

Changes

1 - Replaced source in project configurations with exclude, mimicking .gitignore style, checking every file in the game directory.
2 - Automatically ignore build directory in the building process.
3 - Ignores files starting with ---@lover:ignoreFile (may need some adjustments to only check for .lua, files if needed).
4 - Automatically searches conf.lua in every directory.

Issues

1 - The changes were subjected to some tests, but not that many.
2 - Needs more validation checks.
3 - Not sure what this did but still updated it.

I'm aware that I'm not the best programmer, so feel free to modify it however you think is best.

Copy link
Owner

@Wolfyxon Wolfyxon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The game's assets and code must be in the source directory by default, unless the user changes that in lover.toml.

Do not use the project root as the code directory.

@VamatoHD
Copy link
Contributor Author

What if lover.toml used the following structure instead:

[directories]
source = "src"
exclude = []
build = "build"

This way, the user can exclude certain files from the defined source directory.
I can revert the changes to account for the source configuration.

@Wolfyxon
Copy link
Owner

Yeah that's exactly how it currently works and you also added exclude in [directories].

@VamatoHD
Copy link
Contributor Author

I've reverted the changes and I don't think I have anything more to add.

@Wolfyxon
Copy link
Owner

Alright, I'll give it a proper test in a couple days.
My internet is currently really bad.

@Wolfyxon
Copy link
Owner

Wolfyxon commented Aug 4, 2025

Works great, thanks.
Although I'll make a few adjustments before merging it to the main branch.

@Wolfyxon Wolfyxon changed the base branch from main to file-excluding August 4, 2025 08:06
@Wolfyxon Wolfyxon merged commit 201f724 into Wolfyxon:file-excluding Aug 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments