-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for syncing in a file as if it has a different extension #634
Comments
Thank you for filing this issue! I think it's similar in spirit to #562 and #55, but I like how specific the examples you've presented are. What do you think about overriding existing extensions? I like PRs like #633 in spirit, but I'm worried about potential compatibility hazards, especially when users are including Rojo projects written by different people. Do you think that it'd be okay if these mappings only applied within a single Rojo project? This would help in case you depend on something like a Wally package that relies on |
I think having this per-file or per-project is ideal. There are a few ways I imagined this working, and they're all scoped, not global:
For the actual use-cases I have for this feature, specifying one-off files in I looked into adding support for using
I wasn't worried about this specific case since As long as the user is explicitly specifying the file type/extension override they want per-file, per-directory, or per-project, this should be forwards-compatible with any extension support added to Rojo. Since the user's config takes precedence, behavior of their project wouldn't change. Rewriting I think #55 can cover this, but I worry that implementing plugins will take a lot of time and work compared to adding native support for syncing in as a different extension. |
I think one way we could implement this is as basically a watered-down version of plugins. What if we added a new property on project files that looked like this: {
"name": "example",
"thingies": [
{
"pattern": "wally.lock",
"use": "rojo/plaintext"
},
{
"pattern": "**/*.md",
"use": "rojo/plaintext"
},
{
"pattern": "**/*.spec.lua",
"use": "rojo/ignore"
},
],
"tree": {
"$path": "src"
}
} I don't know what we'd call these thingies. The thing referred to by "use" would conceptually be a plugin, but we can just expose all the built-in Rojo transformers for now. |
That would work for my use-case! |
This was closed by #813! |
Sometimes we have files that we'd like to include in Roblox, but they're either tool-generated with non-standard extensions, or they would work fine synced in as text. It would be nice to include these anyway by telling Rojo, "treat this as if it's a .xyz".
Examples:
.lock
file, which is really a toml. This could be synced in as text or as toml to ensure that the packages in the game match the lockfile..git
are extensionless, but many are just text files. Some of these could be synced in to make sure the git branch matches the place (e.g. to ensure onlymain
runs on production).The text was updated successfully, but these errors were encountered: