mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55:50 +00:00
Infer class name (#210)
* infer service names * Update project code and add support for StarterPlayer * Store parent_class in InstigatingSource * Update snapshots Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
---
|
||||
source: rojo-test/src/build_test.rs
|
||||
expression: contents
|
||||
---
|
||||
<roblox version="4">
|
||||
<Item class="DataModel" referent="0">
|
||||
<Properties>
|
||||
<string name="Name">infer-service-name</string>
|
||||
</Properties>
|
||||
<Item class="HttpService" referent="1">
|
||||
<Properties>
|
||||
<string name="Name">HttpService</string>
|
||||
<bool name="HttpEnabled">true</bool>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="ReplicatedStorage" referent="2">
|
||||
<Properties>
|
||||
<string name="Name">ReplicatedStorage</string>
|
||||
</Properties>
|
||||
<Item class="ModuleScript" referent="3">
|
||||
<Properties>
|
||||
<string name="Name">Main</string>
|
||||
<string name="Source">-- hello, from main</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
</Item>
|
||||
</roblox>
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
source: rojo-test/src/build_test.rs
|
||||
expression: contents
|
||||
---
|
||||
<roblox version="4">
|
||||
<Item class="DataModel" referent="0">
|
||||
<Properties>
|
||||
<string name="Name">infer-service-name</string>
|
||||
</Properties>
|
||||
<Item class="StarterPlayer" referent="1">
|
||||
<Properties>
|
||||
<string name="Name">StarterPlayer</string>
|
||||
</Properties>
|
||||
<Item class="StarterCharacterScripts" referent="2">
|
||||
<Properties>
|
||||
<string name="Name">StarterCharacterScripts</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="StarterPlayerScripts" referent="3">
|
||||
<Properties>
|
||||
<string name="Name">StarterPlayerScripts</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
</Item>
|
||||
</roblox>
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "infer-service-name",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"Main": {
|
||||
"$path": "main.lua"
|
||||
}
|
||||
},
|
||||
"HttpService": {
|
||||
"$properties": {
|
||||
"HttpEnabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
rojo-test/build-tests/infer_service_name/main.lua
Normal file
1
rojo-test/build-tests/infer_service_name/main.lua
Normal file
@@ -0,0 +1 @@
|
||||
-- hello, from main
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "infer-service-name",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
|
||||
"StarterPlayer": {
|
||||
"StarterPlayerScripts": {},
|
||||
"StarterCharacterScripts": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
rojo-test/build-tests/infer_starter_player/main.lua
Normal file
1
rojo-test/build-tests/infer_starter_player/main.lua
Normal file
@@ -0,0 +1 @@
|
||||
-- hello, from main
|
||||
@@ -28,6 +28,8 @@ gen_build_tests! {
|
||||
csv_in_folder,
|
||||
deep_nesting,
|
||||
gitkeep,
|
||||
infer_service_name,
|
||||
infer_starter_player,
|
||||
init_meta_class_name,
|
||||
init_meta_properties,
|
||||
init_with_children,
|
||||
@@ -38,10 +40,10 @@ gen_build_tests! {
|
||||
module_init,
|
||||
rbxm_in_folder,
|
||||
rbxmx_in_folder,
|
||||
rbxmx_ref,
|
||||
script_meta_disabled,
|
||||
server_in_folder,
|
||||
server_init,
|
||||
rbxmx_ref,
|
||||
txt,
|
||||
txt_in_folder,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user