mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 06:35:39 +00:00
Add YAML middleware that behaves like TOML and JSON (#1093)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
---
|
||||
source: src/snapshot_middleware/yaml.rs
|
||||
expression: source
|
||||
---
|
||||
return {
|
||||
string = "this is a string",
|
||||
boolean = true,
|
||||
integer = 1337,
|
||||
float = 123456789.5,
|
||||
["value-with-hypen"] = "it sure is",
|
||||
sequence = {"wow", 8675309},
|
||||
map = {
|
||||
key = "value",
|
||||
key2 = "value 2",
|
||||
key3 = "value 3",
|
||||
},
|
||||
["nested-map"] = {{
|
||||
key = "value",
|
||||
}, {
|
||||
key2 = "value 2",
|
||||
}, {
|
||||
key3 = "value 3",
|
||||
}},
|
||||
whatever_this_is = {"i imagine", "it's", "a", "sequence?"},
|
||||
null1 = nil,
|
||||
null2 = nil,
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
source: src/snapshot_middleware/yaml.rs
|
||||
expression: instance_snapshot
|
||||
---
|
||||
snapshot_id: "00000000000000000000000000000000"
|
||||
metadata:
|
||||
ignore_unknown_instances: false
|
||||
instigating_source:
|
||||
Path: /foo.yaml
|
||||
relevant_paths:
|
||||
- /foo.yaml
|
||||
- /foo.meta.json
|
||||
context:
|
||||
emit_legacy_scripts: true
|
||||
specified_id: ~
|
||||
name: foo
|
||||
class_name: ModuleScript
|
||||
properties:
|
||||
Source:
|
||||
String: "return {\n\tstring = \"this is a string\",\n\tboolean = true,\n\tinteger = 1337,\n\tfloat = 123456789.5,\n\t[\"value-with-hypen\"] = \"it sure is\",\n\tsequence = {\"wow\", 8675309},\n\tmap = {\n\t\tkey = \"value\",\n\t\tkey2 = \"value 2\",\n\t\tkey3 = \"value 3\",\n\t},\n\t[\"nested-map\"] = {{\n\t\tkey = \"value\",\n\t}, {\n\t\tkey2 = \"value 2\",\n\t}, {\n\t\tkey3 = \"value 3\",\n\t}},\n\twhatever_this_is = {\"i imagine\", \"it's\", \"a\", \"sequence?\"},\n\tnull1 = nil,\n\tnull2 = nil,\n}"
|
||||
children: []
|
||||
Reference in New Issue
Block a user