mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
json5
This commit is contained in:
parent
074e62951f
commit
cd63b5c9c0
84 changed files with 743 additions and 288 deletions
|
|
@ -2,7 +2,7 @@
|
|||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/ignored_part.model.json
|
||||
Writing src/int_value.model.json
|
||||
Writing src/ignored_part.model.json5
|
||||
Writing src/int_value.model.json5
|
||||
Writing src/subfolder/string_value.txt
|
||||
Writing src/subfolder
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/Message.model.json
|
||||
Writing src/Message.model.json5
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/dir_with_meta/init.meta.json
|
||||
Writing src/dir_with_meta/init.meta.json5
|
||||
Writing src/model_json.model.json
|
||||
Writing src/project_json.project.json
|
||||
Writing src/dir_with_meta
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/pointer.model.json
|
||||
Writing src/pointer.model.json5
|
||||
Writing src/target.txt
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/Pointer1.model.json
|
||||
Writing src/Pointer2.model.json
|
||||
Writing src/Pointer3.model.json
|
||||
Writing src/Pointer1.model.json5
|
||||
Writing src/Pointer2.model.json5
|
||||
Writing src/Pointer3.model.json5
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: "String::from_utf8_lossy(&output.stdout)"
|
|||
---
|
||||
Writing default.project.json
|
||||
Writing src/adjacent.luau
|
||||
Writing src/adjacent.meta.json
|
||||
Writing src/init/init.meta.json
|
||||
Writing src/adjacent.meta.json5
|
||||
Writing src/init/init.meta.json5
|
||||
Writing src/model.model.json
|
||||
Writing src/init
|
||||
|
|
|
|||
|
|
@ -3,23 +3,23 @@ source: tests/tests/syncback.rs
|
|||
expression: container.model.json
|
||||
---
|
||||
{
|
||||
"children": [
|
||||
children: [
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Id": "value_1",
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/container/value_1"
|
||||
attributes: {
|
||||
Rojo_Id: "value_1",
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_1",
|
||||
},
|
||||
"className": "ObjectValue",
|
||||
"name": "value_1"
|
||||
className: "ObjectValue",
|
||||
name: "value_1",
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Id": "value_1",
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/container/value_2"
|
||||
attributes: {
|
||||
Rojo_Id: "value_1",
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_2",
|
||||
},
|
||||
"className": "ObjectValue",
|
||||
"name": "value_2"
|
||||
}
|
||||
className: "ObjectValue",
|
||||
name: "value_2",
|
||||
},
|
||||
],
|
||||
"className": "Folder"
|
||||
className: "Folder",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/int_value.model.json
|
||||
---
|
||||
{
|
||||
"className": "IntValue",
|
||||
"properties": {
|
||||
"Value": 1337.0
|
||||
}
|
||||
className: "IntValue",
|
||||
properties: {
|
||||
Value: 1337,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/int_value.model.json5
|
||||
---
|
||||
{
|
||||
className: "IntValue",
|
||||
properties: {
|
||||
Value: 1337,
|
||||
},
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/Message.model.json
|
||||
---
|
||||
{
|
||||
"className": "Message",
|
||||
"properties": {
|
||||
"Text": "This message should be written to the disk."
|
||||
}
|
||||
className: "Message",
|
||||
properties: {
|
||||
Text: "This message should be written to the disk.",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/Message.model.json5
|
||||
---
|
||||
{
|
||||
className: "Message",
|
||||
properties: {
|
||||
Text: "This message should be written to the disk.",
|
||||
},
|
||||
}
|
||||
|
|
@ -3,10 +3,5 @@ source: tests/tests/syncback.rs
|
|||
expression: src/dir_with_meta/init.meta.json
|
||||
---
|
||||
{
|
||||
"className": "Configuration",
|
||||
"properties": {
|
||||
"Tags": [
|
||||
"This tag on dir_with_meta"
|
||||
]
|
||||
}
|
||||
"className": "Configuration"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/dir_with_meta/init.meta.json5
|
||||
---
|
||||
{
|
||||
properties: {
|
||||
Tags: [
|
||||
"This tag on dir_with_meta",
|
||||
],
|
||||
},
|
||||
className: "Configuration",
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/model_json.model.json
|
||||
---
|
||||
{
|
||||
"className": "StringValue",
|
||||
"properties": {
|
||||
"Value": "This text is model_json"
|
||||
}
|
||||
className: "StringValue",
|
||||
properties: {
|
||||
Value: "This text is model_json",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@ source: tests/tests/syncback.rs
|
|||
expression: src/project_json.project.json
|
||||
---
|
||||
{
|
||||
"name": "project_json",
|
||||
"tree": {
|
||||
"$className": "Color3Value",
|
||||
"$properties": {
|
||||
"Value": [
|
||||
1337.0,
|
||||
-1337.0,
|
||||
1337.0
|
||||
]
|
||||
}
|
||||
}
|
||||
name: "project_json",
|
||||
tree: {
|
||||
$className: "Color3Value",
|
||||
$properties: {
|
||||
Value: [
|
||||
1337,
|
||||
-1337,
|
||||
1337,
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@ source: tests/tests/syncback.rs
|
|||
expression: nested.project.json
|
||||
---
|
||||
{
|
||||
"name": "Nested",
|
||||
"tree": {
|
||||
"$className": "Configuration",
|
||||
"BoolValue": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
name: "Nested",
|
||||
tree: {
|
||||
$className: "Configuration",
|
||||
BoolValue: {
|
||||
$className: "BoolValue",
|
||||
$properties: {
|
||||
Value: true,
|
||||
},
|
||||
},
|
||||
"StringValue": {
|
||||
"$path": "string_value.txt"
|
||||
}
|
||||
}
|
||||
StringValue: {
|
||||
$path: "string_value.txt",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ source: tests/tests/syncback.rs
|
|||
expression: property_mismatch.project.json
|
||||
---
|
||||
{
|
||||
"name": "property_mismatch",
|
||||
"tree": {
|
||||
"$className": "BrickColorValue",
|
||||
"$properties": {
|
||||
"Value": {
|
||||
"BrickColor": 345
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "property_mismatch",
|
||||
tree: {
|
||||
$className: "BrickColorValue",
|
||||
$properties: {
|
||||
Value: {
|
||||
BrickColor: 345,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/pointer.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/target"
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/target",
|
||||
},
|
||||
"className": "ObjectValue"
|
||||
className: "ObjectValue",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/target.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Id": "test referent id"
|
||||
attributes: {
|
||||
Rojo_Id: "test referent id",
|
||||
},
|
||||
"className": "Folder"
|
||||
className: "Folder",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/pointer.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/target"
|
||||
className: "ObjectValue",
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/target",
|
||||
},
|
||||
"className": "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/pointer.model.json5
|
||||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/target",
|
||||
},
|
||||
className: "ObjectValue",
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/Pointer_2.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/Target_2"
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target_2",
|
||||
},
|
||||
"className": "ObjectValue"
|
||||
className: "ObjectValue",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/Target_2.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Id": "identical ID"
|
||||
attributes: {
|
||||
Rojo_Id: "identical ID",
|
||||
},
|
||||
"className": "Folder"
|
||||
className: "Folder",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/Pointer1.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/Target1"
|
||||
className: "ObjectValue",
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target1",
|
||||
},
|
||||
"className": "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/Pointer1.model.json5
|
||||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target1",
|
||||
},
|
||||
className: "ObjectValue",
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/Pointer2.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/Target2"
|
||||
className: "ObjectValue",
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target2",
|
||||
},
|
||||
"className": "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/Pointer2.model.json5
|
||||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target2",
|
||||
},
|
||||
className: "ObjectValue",
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/Pointer3.model.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Ref_Value": "ReplicatedStorage/Target3"
|
||||
className: "ObjectValue",
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target3",
|
||||
},
|
||||
"className": "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/Pointer3.model.json5
|
||||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target3",
|
||||
},
|
||||
className: "ObjectValue",
|
||||
}
|
||||
|
|
@ -3,14 +3,14 @@ source: tests/tests/syncback.rs
|
|||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"name": "respect_old_middleware",
|
||||
"tree": {
|
||||
"$path": "src",
|
||||
"project_node": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "respect_old_middleware",
|
||||
tree: {
|
||||
$path: "src",
|
||||
project_node: {
|
||||
$className: "BoolValue",
|
||||
$properties: {
|
||||
Value: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ source: tests/tests/syncback.rs
|
|||
expression: src/model_json.model.json
|
||||
---
|
||||
{
|
||||
"className": "StringValue",
|
||||
"properties": {
|
||||
"Value": "This should be a .model.json file"
|
||||
}
|
||||
className: "StringValue",
|
||||
properties: {
|
||||
Value: "This should be a .model.json file",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@ source: tests/tests/syncback.rs
|
|||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"$schema": "rojo/project-schema",
|
||||
"name": "schema_roundtrip",
|
||||
"tree": {
|
||||
"$className": "Folder",
|
||||
"src": {
|
||||
"$path": "src"
|
||||
$schema: "rojo/project-schema",
|
||||
name: "schema_roundtrip",
|
||||
tree: {
|
||||
$className: "Folder",
|
||||
src: {
|
||||
$path: "src",
|
||||
},
|
||||
"trigger_reserialization": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_reserialization: {
|
||||
$className: "BoolValue",
|
||||
$properties: {
|
||||
Value: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,5 @@ source: tests/tests/syncback.rs
|
|||
expression: src/adjacent.meta.json
|
||||
---
|
||||
{
|
||||
"$schema": "rojo/adjacent-meta",
|
||||
"attributes": {
|
||||
"trigger_reserialization": true
|
||||
}
|
||||
"$schema": "rojo/adjacent-meta"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,5 @@ source: tests/tests/syncback.rs
|
|||
expression: src/init/init.meta.json
|
||||
---
|
||||
{
|
||||
"$schema": "rojo/init-meta",
|
||||
"attributes": {
|
||||
"trigger_reserialization": true
|
||||
}
|
||||
"$schema": "rojo/init-meta"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ source: tests/tests/syncback.rs
|
|||
expression: src/model.model.json
|
||||
---
|
||||
{
|
||||
"$schema": "rojo/model.json",
|
||||
"className": "BoolValue"
|
||||
$schema: "rojo/model.json",
|
||||
className: "BoolValue",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,20 +3,20 @@ source: tests/tests/syncback.rs
|
|||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"name": "string_value_project",
|
||||
"tree": {
|
||||
"$className": "Folder",
|
||||
"inside_project_file": {
|
||||
"$className": "StringValue",
|
||||
"$properties": {
|
||||
"Value": "imgettingverytiredofwritingthesetests2"
|
||||
}
|
||||
},
|
||||
"on_file_system": {
|
||||
"$attributes": {
|
||||
"imgettingverytiredofwritingthesetests": "person299 was ahead of his time"
|
||||
name: "string_value_project",
|
||||
tree: {
|
||||
$className: "Folder",
|
||||
inside_project_file: {
|
||||
$className: "StringValue",
|
||||
$properties: {
|
||||
Value: "imgettingverytiredofwritingthesetests2",
|
||||
},
|
||||
"$path": "string_value.txt"
|
||||
}
|
||||
}
|
||||
},
|
||||
on_file_system: {
|
||||
$attributes: {
|
||||
imgettingverytiredofwritingthesetests: "person299 was ahead of his time",
|
||||
},
|
||||
$path: "string_value.txt",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ source: tests/tests/syncback.rs
|
|||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"name": "unscriptable_properties",
|
||||
"syncbackRules": {
|
||||
"syncUnscriptable": true
|
||||
name: "unscriptable_properties",
|
||||
syncbackRules: {
|
||||
syncUnscriptable: true,
|
||||
},
|
||||
tree: {
|
||||
$className: "BinaryStringValue",
|
||||
$properties: {
|
||||
Value: {
|
||||
BinaryString: "Rojo/is/cool",
|
||||
},
|
||||
},
|
||||
},
|
||||
"tree": {
|
||||
"$className": "BinaryStringValue",
|
||||
"$properties": {
|
||||
"Value": {
|
||||
"BinaryString": "Rojo/is/cool"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue