mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 12:45:05 +00:00
Changed file extensions of init command from lua to luau (#831)
This commit is contained in:
@@ -24,3 +24,6 @@ insert_final_newline = true
|
||||
|
||||
[*.lua]
|
||||
indent_style = tab
|
||||
|
||||
[*.luau]
|
||||
indent_style = tab
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
## Unreleased Changes
|
||||
* Improved the visualization for array properties like Tags ([#829])
|
||||
* Significantly improved performance of `rojo serve`, `rojo build --watch`, and `rojo sourcemap --watch` on macOS. [#830]
|
||||
* Significantly improved performance of `rojo serve`, `rojo build --watch`, and `rojo sourcemap --watch` on macOS. ([#830])
|
||||
* Changed *.lua files that init command generates to *.luau ([#831])
|
||||
|
||||
[#829]: https://github.com/rojo-rbx/rojo/pull/829
|
||||
[#830]: https://github.com/rojo-rbx/rojo/pull/830
|
||||
[#831]: https://github.com/rojo-rbx/rojo/pull/831
|
||||
|
||||
## [7.4.0-rc3] - October 25, 2023
|
||||
* Changed `sourcemap --watch` to only generate the sourcemap when it's necessary ([#800])
|
||||
|
||||
@@ -7,7 +7,7 @@ expression: contents
|
||||
<Properties>
|
||||
<string name="Name">server_init</string>
|
||||
<token name="RunContext">0</token>
|
||||
<string name="Source">return "From folder/init.server.lua"</string>
|
||||
<string name="Source">return "From folder/init.server.luau"</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</roblox>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
return "From folder/init.server.lua"
|
||||
@@ -0,0 +1 @@
|
||||
return "From folder/init.server.luau"
|
||||
@@ -13,7 +13,7 @@ use super::resolve_path;
|
||||
static MODEL_PROJECT: &str =
|
||||
include_str!("../../assets/default-model-project/default.project.json");
|
||||
static MODEL_README: &str = include_str!("../../assets/default-model-project/README.md");
|
||||
static MODEL_INIT: &str = include_str!("../../assets/default-model-project/src-init.lua");
|
||||
static MODEL_INIT: &str = include_str!("../../assets/default-model-project/src-init.luau");
|
||||
static MODEL_GIT_IGNORE: &str = include_str!("../../assets/default-model-project/gitignore.txt");
|
||||
|
||||
static PLACE_PROJECT: &str =
|
||||
@@ -116,17 +116,17 @@ fn init_place(base_path: &Path, project_params: ProjectParams) -> anyhow::Result
|
||||
fs::create_dir_all(src.join(&src_client))?;
|
||||
|
||||
write_if_not_exists(
|
||||
&src_shared.join("Hello.lua"),
|
||||
&src_shared.join("Hello.luau"),
|
||||
"return function()\n\tprint(\"Hello, world!\")\nend",
|
||||
)?;
|
||||
|
||||
write_if_not_exists(
|
||||
&src_server.join("init.server.lua"),
|
||||
&src_server.join("init.server.luau"),
|
||||
"print(\"Hello world, from server!\")",
|
||||
)?;
|
||||
|
||||
write_if_not_exists(
|
||||
&src_client.join("init.client.lua"),
|
||||
&src_client.join("init.client.luau"),
|
||||
"print(\"Hello world, from client!\")",
|
||||
)?;
|
||||
|
||||
@@ -149,7 +149,7 @@ fn init_model(base_path: &Path, project_params: ProjectParams) -> anyhow::Result
|
||||
fs::create_dir_all(&src)?;
|
||||
|
||||
let init = project_params.render_template(MODEL_INIT);
|
||||
write_if_not_exists(&src.join("init.lua"), &init)?;
|
||||
write_if_not_exists(&src.join("init.luau"), &init)?;
|
||||
|
||||
let git_ignore = project_params.render_template(MODEL_GIT_IGNORE);
|
||||
try_git_init(base_path, &git_ignore)?;
|
||||
@@ -170,7 +170,7 @@ fn init_plugin(base_path: &Path, project_params: ProjectParams) -> anyhow::Resul
|
||||
fs::create_dir_all(&src)?;
|
||||
|
||||
write_if_not_exists(
|
||||
&src.join("init.server.lua"),
|
||||
&src.join("init.server.luau"),
|
||||
"print(\"Hello world, from plugin!\")\n",
|
||||
)?;
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
"$path": "src"
|
||||
},
|
||||
"plugins": [
|
||||
"test-plugin.lua"
|
||||
"test-plugin.luau"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user