Skip to content

Commit

Permalink
v9
Browse files Browse the repository at this point in the history
  • Loading branch information
2jammers committed Oct 10, 2024
1 parent be9084b commit f7e90ff
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 125 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/event.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,3 @@ jobs:
- name: Publish
run: |
wally publish
publish-announcement:
name: Publish Announcement
runs-on: ubuntu-latest
needs: [publish-package, publish-build]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rokit
uses: CompeyDev/[email protected]

- name: Send webhook
env:
WEBHOOK_URL: ${{ secrets.UPDATE_WEBHOOK_URL }}
run: |
PROJECT="${{ github.repository }}"
VERSION="${{ github.ref_name }}"
lune run .lune/discord.luau "$WEBHOOK_URL" "announcement" "$PROJECT" "$VERSION"
61 changes: 0 additions & 61 deletions .lune/discord.luau

This file was deleted.

9 changes: 9 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixes some issues that are related to yielding code unexpectedly ([#27](https://github.com/luminlabsdev/framework/issues/27))
- Fixes some docs issues

### Changed

- Improved the way lifecycles are loaded ([#26](https://github.com/luminlabsdev/framework/pull/26))

## [9.0.0-rc13] - 2024-09-25

### Added
Expand Down
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ hide:
- navigation
---

A lightning fast & efficient framework for Roblox, inspired by Prvd 'M Wrong.
A lightning fast & efficient framework for Roblox

[Guides](./guides/){ .md-button .md-button--primary }
[Reference](./reference/){ .md-button }
Expand Down Expand Up @@ -44,18 +44,18 @@ return Framework.New {

Organizes your dependencies in an understandable way, so you can easily keep track of what your module uses.

## Straightforward Cycle Design
## Straightforward Lifecycle Design

```luau
local Framework = require(Packages.framework)
local FrameLifecycle = Framework.Lifecycle("Frame")
local FrameLifecycle = Framework.Lifecycle("PostSimulation")
local function Frame()
local function PostSimulation()
print("I print every frame!")
end
return Framework.New {
Frame = Frame,
PostSimulation = PostSimulation,
}
```

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nav:
- Setup: guides/index.md
- Controllers: guides/controllers.md
- Dependencies: guides/dependencies.md
- Cycles: guides/lifecycle-events.md
- Lifecycles: guides/lifecycle-events.md
- Networking: guides/networking.md
- Philosophy: guides/philosophy.md
- API:
Expand Down
1 change: 0 additions & 1 deletion rokit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
wally = "UpliftGames/[email protected]"
wally-package-types = "johnnymorganz/[email protected]"
stylua = "johnnymorganz/[email protected]"
lune = "lune-org/[email protected]"
rojo = "rojo-rbx/[email protected]"
24 changes: 13 additions & 11 deletions src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ end
local function LoadController(callback: () -> (), controllerType: "Start" | "Init")
-- Runs `Start` or `Init` and implements verbose debugging
Debugger.Assert(type(callback) == "function", "IncorrectType", controllerType, "function")
local Success, Err: Debugger.ParsedError = xpcall(callback :: any, Debugger.Parse)
local Success, Err: Debugger.ParsedError = xpcall(function()
task.spawn(callback)
end, Debugger.Parse)
if not Success then
Debugger.Fatal(`Cannot{controllerType}`, Err.Message)
end
Expand Down Expand Up @@ -91,13 +93,6 @@ local function LoadControllersAsync(controllers: { Types.Controller<any> })
local UsedControllers = {}

for _, controller in controllers do
-- Register lifecycles
for _, lifecycle in Lifecycles do
if (controller :: any)[lifecycle.Name] then
table.insert(lifecycle.Listeners, (controller :: any)[lifecycle.Name])
end
end

-- Check if the controller uses any dependencies
if controller.Uses and type(controller.Uses) == "table" then
table.freeze(controller.Uses)
Expand All @@ -119,6 +114,13 @@ local function LoadControllersAsync(controllers: { Types.Controller<any> })
if controller.Start then
LoadController(controller.Start, "Start")
end

-- Register lifecycles
for _, lifecycle in Lifecycles do
if (controller :: any)[lifecycle.Name] then
table.insert(lifecycle.Listeners, (controller :: any)[lifecycle.Name])
end
end
end

-- Connect default lifecycles
Expand All @@ -132,8 +134,8 @@ end
-- Loads all of the provided directories
local function Import(directories: { Instance }, filter: ((ModuleScript) -> boolean)?): { Types.Controller<any> }
local Controllers = {}
for _, driectory in directories do
for _, module in driectory:GetChildren() do
for _, directory in directories do
for _, module in directory:GetChildren() do
if not (module:IsA("ModuleScript") or filter and filter(module :: ModuleScript)) then
continue
end
Expand Down Expand Up @@ -179,7 +181,7 @@ export type Controller<T> = Types.Controller<T>

return table.freeze({
-- Version
version = { major = 9, minor = 0, patch = 0, rc = 9 },
version = "9",

-- Starter
Start = Start,
Expand Down
2 changes: 1 addition & 1 deletion wally.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lumin/framework"
description = "A lightning fast & amazing game framework for Roblox"
version = "9.0.0-rc13"
version = "9.0.0"
license = "MIT"
registry = "https://github.com/UpliftGames/wally-index"
realm = "shared"
Expand Down

0 comments on commit f7e90ff

Please sign in to comment.