From 93a70536f7b24d7900979f70f31153820ca55c5a Mon Sep 17 00:00:00 2001 From: James <119134081+2jammers@users.noreply.github.com> Date: Sun, 15 Dec 2024 21:26:27 -0600 Subject: [PATCH] chore: update repo to new standards updates the framework repo to newer standards, which make things more clear and organized --- .github/workflows/ci.yml | 29 ------------ .github/workflows/release.yml | 81 +++++++++++++++------------------- .gitignore | 16 +++---- .vscode/settings.json | 7 --- LICENSE | 4 +- README.md | 39 +++++++++++++--- default.project.json | 6 --- dev.project.json | 24 ++++------ mkdocs.yml | 83 ----------------------------------- pesde.toml | 32 ++++++++++++++ rokit.toml | 10 ----- src/init.luau | 11 +++-- standalone.project.json | 9 ++-- wally.toml | 17 ------- 14 files changed, 130 insertions(+), 238 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .vscode/settings.json delete mode 100644 default.project.json delete mode 100644 mkdocs.yml create mode 100644 pesde.toml delete mode 100644 rokit.toml delete mode 100644 wally.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index c8cda3e6..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: ci -on: - push: - branches: - - master - - main -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8736526..ce86c893 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Draft +name: Release on: push: @@ -11,62 +11,52 @@ permissions: id-token: write jobs: - bump: - name: Bump Versions + changelog: + name: Changelog runs-on: ubuntu-latest outputs: release-body: ${{ steps.update-changelog.outputs.release-notes }} steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: - ref: "main" + ref: main - name: Update changelog id: update-changelog uses: thomaseizinger/keep-a-changelog-new-release@3.1.0 with: tag: ${{ github.ref_name }} - changelogPath: "docs/changelog.md" - - - name: Configure Git - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + changelogPath: 'docs/changelog.md' - name: Commit and push - run: | - git add docs/changelog.md - git commit --message "Bump version to ${{ github.ref_name }}" + uses: EndBug/add-and-commit@v9 + with: + message: Bump version to ${{ github.ref_name }} + default_author: github_actions - publish-build: - name: Publish Assets + build: + name: Build runs-on: ubuntu-latest - needs: bump + needs: changelog steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Rokit - uses: CompeyDev/setup-rokit@v0.1.0 - - - name: Install Wally dependencies - run: wally install + - uses: actions/checkout@v4 - - name: Generate sourcemap - run: rojo sourcemap standalone.project.json --output sourcemap.json + - name: Setup Pesde + uses: 2jammers/setup-pesde@v0.3.0 + with: + cache: true - - name: Generate package types - run: wally-package-types --sourcemap sourcemap.json Packages + - name: Install dependencies + run: pesde install - name: Format code run: stylua src/ - - name: Build standalone + - name: Standalone build run: rojo build standalone.project.json --output ./Standalone.rbxm - - name: Draft release - uses: softprops/action-gh-release@v2.0.8 + - name: Standalone release + uses: softprops/action-gh-release@v2.0.9 with: tag_name: ${{ github.ref_name }} name: ${{ github.ref_name }} @@ -74,25 +64,24 @@ jobs: generate_release_notes: true body: | ## Changelog - ${{ needs.bump.outputs.release-body }} + ${{ needs.changelog.outputs.release-body }} files: | ./Standalone.rbxm - publish-package: - name: Publish Package + package: + name: Package runs-on: ubuntu-latest - needs: bump + needs: changelog steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Rokit - uses: CompeyDev/setup-rokit@v0.1.0 + - uses: actions/checkout@v4 - - name: Log In - run: | - wally login --token "${{secrets.WALLY_AUTH_TOKEN}}" + - name: Setup Pesde + uses: 2jammers/setup-pesde@v0.3.0 + with: + cache: true + token: '${{ secrets.PESDE_TOKEN }}' - name: Publish run: | - wally publish + pesde install + pesde publish -y diff --git a/.gitignore b/.gitignore index 1cc7e3eb..67ed5eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,9 @@ -# Moonwave -venv +# Pesde +.pesde +roblox_packages +lune_packages +luau_packages +pesde.lock -# Wally -Packages -DevPackages -wally.lock - -# Argon +# Rojo sourcemap.json - diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index f873e6d9..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "luau-lsp.require.mode": "relativeToFile", - "luau-lsp.require.directoryAliases": { - "@lune/": "~/.lune/.typedefs/0.8.6/" -}, -"stylua.targetReleaseVersion": "latest" -} diff --git a/LICENSE b/LICENSE index f746d4a2..025b89ae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Lumin Labs & Contributors +Copyright (c) 2025 Lumin & Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index d66f518c..7a8f9a35 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,36 @@ -# Framework +# lumin/framework -[![license](https://img.shields.io/github/license/luminlabsdev/framework)](https://github.com/luminlabsdev/framework/blob/main/LICENSE) -[![release](https://img.shields.io/github/v/release/luminlabsdev/framework)](https://github.com/luminlabsdev/framework/releases/latest) -[![discord](https://img.shields.io/discord/1105688855375511642?logo=discord&logoColor=white&label=discord&color=4d3dff)](https://luminlabsdev.github.io/link/discord) +[![package](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Flumin-org%2Fframework%2Frefs%2Fheads%2Fmain%2Fpesde.toml&query=version&prefix=lumin%2Fui%40&style=plastic&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI%2BCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDkuNjAyNSAwTDkyLjkwMzggMjVWNzVMNDkuNjAyNSAxMDBMNi4zMDEyNyA3NVYyNUw0OS42MDI1IDBaTTE0LjMwMTMgMjkuNjE4OEw0OS42MDI1IDkuMjM3Nkw4NC45MDM4IDI5LjYxODhWNzAuMzgxMkw0OS42MDI1IDkwLjc2MjRMMzMuNjE0OCA4MS41MzE5VjY3LjM4NDhDMzQuNTE2NyA2OC41MDcxIDM1LjYzODggNjkuNDIxNSAzNi45ODEgNzAuMTI3OUMzOC45NzAxIDcxLjE0OCA0MS4wMzU3IDcxLjY1OCA0My4xNzc5IDcxLjY1OEM0Ni40NDIgNzEuNjU4IDQ5LjE0NTIgNzAuODkyOSA1MS4yODczIDY5LjM2MjlDNTMuNDgwNSA2Ny43ODE4IDU1LjExMjYgNjUuNzY3MiA1Ni4xODM2IDYzLjMxOUM1Ny4wOTE1IDYxLjMzODIgNTcuNjMyIDU5LjI3NCA1Ny44MDU0IDU3LjEyNjNDNTkuODcyMyA1Ny43NDU3IDYyLjIxNTcgNTguMDU1NCA2NC44MzU2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S4wMDIxIDQ2LjA4NSA2NC4xODYxIDQ3Ljc2ODEgNjIuNTU0QzQ5LjQ1MTIgNjAuOTIxOSA1MC4yOTI4IDU4LjYwMTIgNTAuMjkyOCA1NS41OTIxQzUwLjI5MjggNTQuMDY3OSA1MC4wNzY5IDUyLjcyNyA0OS42NDUxIDUxLjU2OTJaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K&label=pesde&color=F19D1E)](https://pesde.dev/packages/lumin/framework) +[![ci](https://img.shields.io/github/actions/workflow/status/lumin-org/framework/release.yml?style=plastic&logo=github&logoColor=FFFFFF&label=ci)](https://github.com/lumin-org/framework/blob/main/.github/workflows/release.yml) +[![discord](https://img.shields.io/discord/1105688855375511642?logo=discord&logoColor=white&label=chat&color=4d3dff&style=plastic)](https://lumin-org.github.io/to/discord) -A lightning fast & efficient framework for Roblox. +A featherlight and quick framework for Roblox experiences. + +## Prerequisites + +In order to use **lumin/framework** you must have the following dependencies installed: + +* [`pesde@^0.5.1`](https://github.com/pesde-pkg/pesde) +* [`rojo@^7.4.4`](https://github.com/rojo-rbx/rojo) + +## Usage + +This usage examples creates a new, and basic controller that uses another dependency. + +```luau +local Framework = require(path.to.framework) +local Dependency = require(path.to.dependency) + +local function Init() + Dependency.NuclearExplosion() +end + +return Framework.New { + Init = Init, + Uses = { Dependency } -- Makes the dependency load first +} +``` + +# License + +This project is licensed under the [MIT](https://github.com/lumin-org/framework/blob/main/LICENSE) license diff --git a/default.project.json b/default.project.json deleted file mode 100644 index 67722dab..00000000 --- a/default.project.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "framework", - "tree": { - "$path": "src" - } -} \ No newline at end of file diff --git a/dev.project.json b/dev.project.json index 312eb33a..12b0e710 100644 --- a/dev.project.json +++ b/dev.project.json @@ -4,23 +4,17 @@ "tree": { "$className": "DataModel", "ReplicatedStorage": { - "DevPackages": { - "$path": "DevPackages" - }, - "Packages": { - "$path": "Packages", - "framework": { + "framework": { + "$className": "Folder", + "src": { "$path": "src" - } - }, - "Tests": { - "$className": "Folder", - "Client": { - "$path": "tests/client" }, - "Server": { - "$path": "tests/server" - } + "roblox_packages": { + "$path": "roblox_packages" + } + }, + "tests": { + "$path": "tests" } } } diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 147a0c30..00000000 --- a/mkdocs.yml +++ /dev/null @@ -1,83 +0,0 @@ -site_name: Lumin Framework -repo_url: https://github.com/luminlabsdev/framework -repo_name: luminlabsdev/framework -copyright: Copyright © 2021 - 2024 Lumin Labs & Contributors -edit_uri: edit/main/docs/ -nav: - - Home: index.md - - Guides: - - Setup: guides/index.md - - Controllers: guides/controllers.md - - Dependencies: guides/dependencies.md - - Lifecycles: guides/lifecycle-events.md - - Networking: guides/networking.md - - Philosophy: guides/philosophy.md - - API: - - Framework: api/index.md - - Controller: api/controller.md - - Lifecycle: api/lifecycle.md - - Install: installation.md - - Changelog: changelog.md -markdown_extensions: - - attr_list - - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format -extra: - social: - - icon: fontawesome/brands/github - link: https://github.com/luminlabsdev - - icon: fontawesome/brands/discord - link: https://luminlabsdev.github.io/link/discord -theme: - name: material - favicon: assets/images/favicon.ico - font: - text: Inter - code: JetBrains Mono - icon: - edit: material/pencil - view: material/eye - features: - - navigation.instant - - navigation.instant.progress - - navigation.tabs - - navigation.path - - navigation.top - - navigation.footer - - content.action.edit - - content.code.copy - - content.code.select - - content.tooltips - palette: - - # Palette toggle for automatic mode - - media: "(prefers-color-scheme)" - toggle: - icon: material/brightness-auto - name: Switch to light mode - - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - primary: black - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: black - toggle: - icon: material/weather-night - name: Switch to system preference diff --git a/pesde.toml b/pesde.toml new file mode 100644 index 00000000..e64b597e --- /dev/null +++ b/pesde.toml @@ -0,0 +1,32 @@ +name = "lumin/framework" +version = "9.1.1" +description = "A featherlight and quick framework for Roblox experiences" +authors = ["2jammers"] +repository = "https://github.com/lumin-org/framework" +license = "MIT" +includes = [ + "pesde.toml", + "README.md", + "LICENSE", + "src", +] + +[target] +environment = "roblox" +lib = "src/init.luau" +build_files = ["src"] + +[indices] +default = "https://github.com/daimond113/pesde-index" + +[scripts] +roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" +sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" + +[dev_dependencies] +scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } +rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } +stylua = { name = "pesde/stylua", version = "^2.0.1", target = "lune" } + +[dependencies] +debugger = { name = "lumin/debugger", version = "^0.5.0" } diff --git a/rokit.toml b/rokit.toml deleted file mode 100644 index b64efd58..00000000 --- a/rokit.toml +++ /dev/null @@ -1,10 +0,0 @@ -# This file lists tools managed by Rokit, a toolchain manager for Roblox projects. -# For more information, see https://github.com/rojo-rbx/rokit - -# New tools can be added by running `rokit add ` in a terminal. - -[tools] -wally = "UpliftGames/wally@0.3.2" -wally-package-types = "johnnymorganz/wally-package-types@1.3.2" -stylua = "johnnymorganz/stylua@2.0.1" -rojo = "rojo-rbx/rojo@7.4.4" diff --git a/src/init.luau b/src/init.luau index 9ffcedc4..12f34fc5 100644 --- a/src/init.luau +++ b/src/init.luau @@ -1,6 +1,5 @@ -- Variables - -local Packages = script.Parent +local Packages = script.Parent.roblox_packages local Types = require(script.Types) local Logs = require(script.Logs) local Debugger = require(Packages.debugger) @@ -34,7 +33,7 @@ end --[=[ Creates a new lifecycle that hooks onto already existing controller methods. - [Learn More](https://luminlabsdev.github.io/framework/api/#lifecycle) + [Open Documentation](https://lumin-org.github.io/framework/api/#lifecycle) ]=] local function Lifecycle( name: string, @@ -54,7 +53,7 @@ end --[=[ Creates a new controller for management of various tasks. Returned table is frozen. - [Learn More](https://luminlabsdev.github.io/framework/api/#new) + [Open Documentation](https://lumin-org.github.io/framework/api/#new) ]=] local function New(members: Types.Controller, order: number?): T Debugger.Assert(not Started, "AlreadyStarted") @@ -128,7 +127,7 @@ end --[=[ Starts the framework, loading all the created controllers and starting cycles. - [Learn More](https://luminlabsdev.github.io/framework/api/#start) + [Open Documentation](https://lumin-org.github.io/framework/api/#start) ]=] local function Start(directories: { Instance }, filter: ((ModuleScript) -> boolean)?, callback: (() -> ())?) Debugger.Assert(not Started, "AlreadyStarted") @@ -160,7 +159,7 @@ export type Controller = Types.Controller return table.freeze({ -- Version - version = "9.1.0", + version = { major = 9, minor = 1, patch = 1 }, -- Starter Start = Start, diff --git a/standalone.project.json b/standalone.project.json index e3c80c6d..bac35407 100644 --- a/standalone.project.json +++ b/standalone.project.json @@ -1,9 +1,12 @@ { - "name": "standalone", + "name": "framework", "tree": { - "$path": "Packages", - "framework": { + "$className": "Folder", + "src": { "$path": "src" + }, + "roblox_packages": { + "$path": "roblox_packages" } } } diff --git a/wally.toml b/wally.toml deleted file mode 100644 index 6a801efc..00000000 --- a/wally.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "lumin/framework" -description = "A lightning fast & amazing game framework for Roblox" -version = "9.1.0" -license = "MIT" -registry = "https://github.com/UpliftGames/wally-index" -realm = "shared" - -[dependencies] -debugger = "lumin/debugger@^0.4.0" - -[dev-dependencies] -net = "lumin/net@0.4.1" -signal = "sleitnick/signal@2.0.1" - -[place] -shared-packages = "game.ReplicatedStorage.Packages"