Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize old templates #746

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/default-model-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Generated by [Rojo](https://github.com/rojo-rbx/rojo) {rojo_version}.

## Getting Started
To build this library, use:
To build this model, use:

```bash
rojo build -o "{project_name}.rbxmx"
rojo build -o "{project_name}.rbxm"
```

For more help, check out [the Rojo documentation](https://rojo.space/docs).
For more help, check out [the Rojo documentation](https://rojo.space/docs).
8 changes: 6 additions & 2 deletions assets/default-model-project/gitignore.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Model files
/*.rbxmx
/*.rbxm

# Roblox Studio lock files
/*.rbxlx.lock
/*.rbxl.lock
*.rbxlx.lock
*.rbxl.lock
2 changes: 1 addition & 1 deletion assets/default-model-project/src-init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ return {
hello = function()
print("Hello world, from {project_name}!")
end,
}
}
6 changes: 3 additions & 3 deletions assets/default-place-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Generated by [Rojo](https://github.com/rojo-rbx/rojo) {rojo_version}.
To build the place from scratch, use:

```bash
rojo build -o "{project_name}.rbxlx"
rojo build -o "{project_name}.rbxl"
```

Next, open `{project_name}.rbxlx` in Roblox Studio and start the Rojo server:
Next, open `{project_name}.rbxl` in Roblox Studio and start the Rojo server:

```bash
rojo serve
```

For more help, check out [the Rojo documentation](https://rojo.space/docs).
For more help, check out [the Rojo documentation](https://rojo.space/docs).
61 changes: 27 additions & 34 deletions assets/default-place-project/default.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,64 @@
"name": "{project_name}",
"tree": {
"$className": "DataModel",

"Lighting": {
"$properties": {
"Outlines": false,
"Ambient": [
0.0,
0.0,
0.0
],
"GlobalShadows": true,
"Brightness": 2.0,
"Technology": "Voxel"
}
},
"ReplicatedStorage": {
"Shared": {
"$path": "src/shared"
}
},

"ServerScriptService": {
"Server": {
"$path": "src/server"
}
},

"SoundService": {
"$properties": {
"RespectFilteringEnabled": true
}
},
"StarterPlayer": {
"StarterPlayerScripts": {
"Client": {
"$path": "src/client"
}
}
},

"Workspace": {
"$properties": {
"FilteringEnabled": true
},
"Baseplate": {
"$className": "Part",
"$properties": {
"Anchored": true,
"Color": [
0.38823,
0.37254,
0.38823
],
"Locked": true,
"Position": [
0,
-10,
0
0.0,
-10.0,
0.0
],
"Size": [
512,
20,
512
]
512.0,
20.0,
512.0
],
"Anchored": true,
"Locked": true
}
}
},
"Lighting": {
"$properties": {
"Ambient": [
0,
0,
0
],
"Brightness": 2,
"GlobalShadows": true,
"Outlines": false,
"Technology": "Voxel"
}
},
"SoundService": {
"$properties": {
"RespectFilteringEnabled": true
}
}
}
}
9 changes: 5 additions & 4 deletions assets/default-place-project/gitignore.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Project place file
/{project_name}.rbxlx
# Place files
/*.rbxlx
/*.rbxl

# Roblox Studio lock files
/*.rbxlx.lock
/*.rbxl.lock
*.rbxlx.lock
*.rbxl.lock
6 changes: 3 additions & 3 deletions src/cli/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,17 @@ fn init_place(base_path: &Path, project_params: ProjectParams) -> anyhow::Result

write_if_not_exists(
&src_shared.join("Hello.lua"),
"return function()\n\tprint(\"Hello, world!\")\nend",
"return function()\n\tprint(\"Hello, world!\")\nend\n",
)?;

write_if_not_exists(
&src_server.join("init.server.lua"),
"print(\"Hello world, from server!\")",
"print(\"Hello world, from server!\")\n",
)?;

write_if_not_exists(
&src_client.join("init.client.lua"),
"print(\"Hello world, from client!\")",
"print(\"Hello world, from client!\")\n",
)?;

let git_ignore = project_params.render_template(PLACE_GIT_IGNORE);
Expand Down