mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Refactor project configuration to use .json format
- Replaced the legacy .json5 project file with a new .json format for `plugin.project.json`. - Updated `build.rs` to prioritize the new .json format while maintaining backward compatibility with .json5. - Made adjustments to the Confirming.lua file to enhance UI consistency. - Improved metadata handling in snapshot middleware to support both modern and legacy file extensions.
This commit is contained in:
parent
5f059dbc16
commit
5a85c5145c
7 changed files with 50 additions and 24 deletions
|
|
@ -38,7 +38,9 @@ pub fn name_for_inst<'old>(
|
|||
| Middleware::CsvDir
|
||||
| Middleware::ServerScriptDir
|
||||
| Middleware::ClientScriptDir
|
||||
| Middleware::ModuleScriptDir => {
|
||||
| Middleware::ModuleScriptDir
|
||||
| Middleware::LocalScriptDir
|
||||
| Middleware::LegacyScriptDir => {
|
||||
let name = if encode_invalid_chars {
|
||||
let encoded = encode_path_name(&new_inst.name);
|
||||
// Validate for issues not fixed by encoding (trailing space/dot, control chars, reserved names)
|
||||
|
|
|
|||
|
|
@ -306,7 +306,14 @@ impl<'sync> SyncbackSnapshot<'sync> {
|
|||
|
||||
pub fn filter_out_property(inst: &Instance, prop_name: &str) -> bool {
|
||||
match inst.class.as_str() {
|
||||
"Script" | "LocalScript" | "ModuleScript" => {
|
||||
"Script" => {
|
||||
// These properties shouldn't be set by scripts that are created via
|
||||
// `$path` or via being on the file system.
|
||||
// RunContext is filtered because it's encoded in the file extension:
|
||||
// .server.luau → Server, .client.luau → Client, .plugin.luau → Plugin, .legacy.luau → Legacy
|
||||
prop_name == "Source" || prop_name == "ScriptGuid" || prop_name == "RunContext"
|
||||
}
|
||||
"LocalScript" | "ModuleScript" => {
|
||||
// These properties shouldn't be set by scripts that are created via
|
||||
// `$path` or via being on the file system.
|
||||
prop_name == "Source" || prop_name == "ScriptGuid"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue