mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 12:45:05 +00:00
init.meta.json support (#183)
* A minimum viable product for init.meta.json * Properties support * Add ignoreUnknownChildren support * Apply requested changes * Use reflection guiding * Add a script to the test * Change to ignoreUnknownInstances * Apply requested changes
This commit is contained in:
committed by
Lucien Greathouse
parent
983d44947e
commit
0ed6c57c7f
6
test-projects/meta_files/default.project.json
Normal file
6
test-projects/meta_files/default.project.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "test-model",
|
||||
"tree": {
|
||||
"$path": "src"
|
||||
}
|
||||
}
|
||||
57
test-projects/meta_files/expected-snapshot.json
Normal file
57
test-projects/meta_files/expected-snapshot.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "test-model",
|
||||
"class_name": "Tool",
|
||||
"properties": {
|
||||
"Enabled": {
|
||||
"Type": "Bool",
|
||||
"Value": true
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "A",
|
||||
"class_name": "Folder",
|
||||
"properties": {},
|
||||
"children": [],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": true,
|
||||
"source_path": "src/A",
|
||||
"project_definition": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Script",
|
||||
"class_name": "Script",
|
||||
"properties": {
|
||||
"Disabled": {
|
||||
"Type": "Bool",
|
||||
"Value": true
|
||||
},
|
||||
"Source": {
|
||||
"Type": "String",
|
||||
"Value": "print(\"Hello, world\")"
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": false,
|
||||
"source_path": "src/Script",
|
||||
"project_definition": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": false,
|
||||
"source_path": "src",
|
||||
"project_definition": [
|
||||
"test-model",
|
||||
{
|
||||
"class_name": null,
|
||||
"children": {},
|
||||
"properties": {},
|
||||
"ignore_unknown_instances": null,
|
||||
"path": "src"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
3
test-projects/meta_files/src/A/init.meta.json
Normal file
3
test-projects/meta_files/src/A/init.meta.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"ignoreUnknownInstances": true
|
||||
}
|
||||
5
test-projects/meta_files/src/Script/init.meta.json
Normal file
5
test-projects/meta_files/src/Script/init.meta.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"properties": {
|
||||
"Disabled": true
|
||||
}
|
||||
}
|
||||
1
test-projects/meta_files/src/Script/init.server.lua
Normal file
1
test-projects/meta_files/src/Script/init.server.lua
Normal file
@@ -0,0 +1 @@
|
||||
print("Hello, world")
|
||||
6
test-projects/meta_files/src/init.meta.json
Normal file
6
test-projects/meta_files/src/init.meta.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"className": "Tool",
|
||||
"properties": {
|
||||
"Enabled": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user