diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..876fbd3c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.luau linguist-language=Lua diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59189268..f52ea618 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,9 @@ jobs: - name: Format run: stylua --check src/ + - name: Lint file extensions + run: ./bin/lint.sh + - name: Install dependencies run: wally install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9f347f0..0f7d5d67 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Remove spec files - run: rm -rf **/*.spec.lua + run: rm -rf **/*.spec.luau - name: Install packages run: wally install diff --git a/bin/analyze.sh b/bin/analyze.sh index 27d530d4..e452e6d5 100755 --- a/bin/analyze.sh +++ b/bin/analyze.sh @@ -4,7 +4,7 @@ curl -s -O https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/master/scrip rojo sourcemap tests.project.json -o sourcemap.json -luau-lsp analyze --sourcemap=sourcemap.json --defs=globalTypes.d.lua --defs=testez.d.lua --ignore=**/_Index/** src/ +luau-lsp analyze --sourcemap=sourcemap.json --defs=globalTypes.d.lua --defs=testez.d.luau --ignore=**/_Index/** src/ exit_code=$? rm globalTypes.d.lua diff --git a/bin/lint.sh b/bin/lint.sh new file mode 100755 index 00000000..1ee55d8c --- /dev/null +++ b/bin/lint.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Lint file extensions" +files=$(find src example -iname "*.lua") +if [[ -n "$files" ]]; then + echo "Error: one or more files are using the '.lua' extension. Please update these to '.luau' and try again" + echo "$files" + exit 1 +fi diff --git a/bin/test.sh b/bin/test.sh index 8f7a9ed8..6d48bf3b 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -1,3 +1,3 @@ rojo build tests.project.json -o tests.rbxl -run-in-roblox --place tests.rbxl --script tests/init.server.lua +run-in-roblox --place tests.rbxl --script tests/init.server.luau rm tests.rbxl diff --git a/docs/docs/contributing.md b/docs/docs/contributing.md index 855a3f67..4dd4d0be 100644 --- a/docs/docs/contributing.md +++ b/docs/docs/contributing.md @@ -73,7 +73,7 @@ Then load a new Baseplate and open the flipbook plugin. Its storybook should now ## Testing -While developing, you should also be writing unit tests. Unit tests are written in `.spec.lua` files. You can see examples of this throughout the repository's codebase. +While developing, you should also be writing unit tests. Unit tests are written in `.spec.luau` files. You can see examples of this throughout the repository's codebase. To run tests, simply start the experience in Studio. You will see in the output if tests are passing or failing. diff --git a/docs/docs/migrating.md b/docs/docs/migrating.md index 3c0a9d28..cd5926be 100644 --- a/docs/docs/migrating.md +++ b/docs/docs/migrating.md @@ -15,15 +15,15 @@ This guide assumes you are using [Rojo](https://github.com/rojo-rbx/rojo/) to ma The main difference in how flipbook and Hoarcekat handle stories is that flipbook requires a "storybook" file to know where your stories are. As such, to migrate over from Hoarcekat the first thing you should do is create a storybook for your project. -To do this, create a new `ProjectName.storybook.lua` file at the root of your project with the following contents: +To do this, create a new `ProjectName.storybook.luau` file at the root of your project with the following contents: ```lua --- Make sure to adjust the path to Roact if needed +-- Make sure to adjust the path to Roact if needed local Roact = require(script.Parent.Parent.Roact) return { roact = Roact, - storyRoots = { + storyRoots = { script.Parent.Components } } @@ -38,13 +38,13 @@ To fully benefit from the features flipbook has to offer, this section will guid We will use the following component and story as an example: ```lua --- HelloWorld.lua +-- HelloWorld.luau type Props = { name: string? } local function HelloWorld(props: Props) - local name = props.name or "World" + local name = props.name or "World" return Roact.createElement("TextLabel", { Text = ("Hello %s!"):format(name), @@ -60,7 +60,7 @@ return HelloWorld ``` ```lua --- HelloWorld.story.lua +-- HelloWorld.story.luau local Roact = require(script.Parent.Parent.Roact) local HelloWorld = require(script.Parent.HelloWorld) @@ -82,7 +82,7 @@ end Converting a Hoarcekat story like this into one compatible with flipbook is quite easy. In fact, all that's needed from the above story is the call to `Roact.createElement`: ```lua --- HelloWorld.story.lua +-- HelloWorld.story.luau local Roact = require(script.Parent.Parent.Roact) local HelloWorld = require(script.Parent.HelloWorld) @@ -137,4 +137,4 @@ You are now equipped to migrate your other Hoarcekat stories over to flipbook! ## Further Reading - [Writing Stories](writing-stories.md) -- [Story Format](story-format.md) \ No newline at end of file +- [Story Format](story-format.md) diff --git a/docs/docs/writing-stories.md b/docs/docs/writing-stories.md index 89aa78e1..d2cdf483 100644 --- a/docs/docs/writing-stories.md +++ b/docs/docs/writing-stories.md @@ -8,7 +8,7 @@ flipbook uses the concept of "storybooks" and "stories." A storybook is used to ## Storybook -Every project needs a storybook, so to get started you will create a new `ProjectName.storybook.lua` file at the root of your project with the following contents: +Every project needs a storybook, so to get started you will create a new `ProjectName.storybook.luau` file at the root of your project with the following contents: ```lua title="src/ProjectName.storybook.lua" -- Make sure to adjust the path to Roact if needed @@ -28,7 +28,7 @@ Right now you should see a single entry in flipbook's sidebar for this storybook ## Story -A story and its associated component should be in two separate files. Both files should share the same name, however the story will end with `.story`. To get started, let's create `Button.lua` and `Button.story.lua`: +A story and its associated component should be in two separate files. Both files should share the same name, however the story will end with `.story`. To get started, let's create `Button.luau` and `Button.story.luau`: ```lua title="src/Components/Button.lua" local Roact = require(path.to.Roact) diff --git a/example/ArrayControls.story.lua b/example/ArrayControls.story.luau similarity index 100% rename from example/ArrayControls.story.lua rename to example/ArrayControls.story.luau diff --git a/example/Button.lua b/example/Button.luau similarity index 100% rename from example/Button.lua rename to example/Button.luau diff --git a/example/Button.story.lua b/example/Button.story.luau similarity index 100% rename from example/Button.story.lua rename to example/Button.story.luau index 4f23b032..6fc5c2d1 100644 --- a/example/Button.story.lua +++ b/example/Button.story.luau @@ -1,7 +1,7 @@ local Example = script:FindFirstAncestor("Example") -local Roact = require(Example.Parent.Packages.Roact) local Button = require(script.Parent.Button) +local Roact = require(Example.Parent.Packages.Roact) return { summary = "A generic button component that can be used anywhere", diff --git a/example/ButtonWithControls.lua b/example/ButtonWithControls.luau similarity index 100% rename from example/ButtonWithControls.lua rename to example/ButtonWithControls.luau diff --git a/example/ButtonWithControls.story.lua b/example/ButtonWithControls.story.luau similarity index 100% rename from example/ButtonWithControls.story.lua rename to example/ButtonWithControls.story.luau index 3d0aad70..ffdef006 100644 --- a/example/ButtonWithControls.story.lua +++ b/example/ButtonWithControls.story.luau @@ -1,7 +1,7 @@ local Example = script:FindFirstAncestor("Example") -local Roact = require(Example.Parent.Packages.Roact) local ButtonWithControls = require(script.Parent.ButtonWithControls) +local Roact = require(Example.Parent.Packages.Roact) local controls = { isDisabled = false, diff --git a/example/CanvasTests/AutomaticSize.story.lua b/example/CanvasTests/AutomaticSize.story.luau similarity index 100% rename from example/CanvasTests/AutomaticSize.story.lua rename to example/CanvasTests/AutomaticSize.story.luau diff --git a/example/CanvasTests/AutomaticSizeExceedsBounds.story.lua b/example/CanvasTests/AutomaticSizeExceedsBounds.story.luau similarity index 100% rename from example/CanvasTests/AutomaticSizeExceedsBounds.story.lua rename to example/CanvasTests/AutomaticSizeExceedsBounds.story.luau diff --git a/example/CanvasTests/Offset.story.lua b/example/CanvasTests/Offset.story.luau similarity index 100% rename from example/CanvasTests/Offset.story.lua rename to example/CanvasTests/Offset.story.luau diff --git a/example/CanvasTests/Resizing.story.lua b/example/CanvasTests/Resizing.story.luau similarity index 100% rename from example/CanvasTests/Resizing.story.lua rename to example/CanvasTests/Resizing.story.luau diff --git a/example/CanvasTests/Scale.story.lua b/example/CanvasTests/Scale.story.luau similarity index 100% rename from example/CanvasTests/Scale.story.lua rename to example/CanvasTests/Scale.story.luau diff --git a/example/CanvasTests/ScrollingFrame.story.lua b/example/CanvasTests/ScrollingFrame.story.luau similarity index 100% rename from example/CanvasTests/ScrollingFrame.story.lua rename to example/CanvasTests/ScrollingFrame.story.luau diff --git a/example/Counter.lua b/example/Counter.luau similarity index 100% rename from example/Counter.lua rename to example/Counter.luau diff --git a/example/Counter.story.lua b/example/Counter.story.luau similarity index 100% rename from example/Counter.story.lua rename to example/Counter.story.luau index 4c2b5f41..fb5ce18e 100644 --- a/example/Counter.story.lua +++ b/example/Counter.story.luau @@ -1,7 +1,7 @@ local Example = script:FindFirstAncestor("Example") -local Roact = require(Example.Parent.Packages.Roact) local Counter = require(script.Parent.Counter) +local Roact = require(Example.Parent.Packages.Roact) local controls = { increment = 1, diff --git a/example/Example.storybook.lua b/example/Example.storybook.luau similarity index 100% rename from example/Example.storybook.lua rename to example/Example.storybook.luau diff --git a/example/Functional.story.lua b/example/Functional.story.luau similarity index 100% rename from example/Functional.story.lua rename to example/Functional.story.luau diff --git a/example/Hoarcekat.story.lua b/example/Hoarcekat.story.luau similarity index 100% rename from example/Hoarcekat.story.lua rename to example/Hoarcekat.story.luau diff --git a/example/ReactCounter.lua b/example/ReactCounter.luau similarity index 100% rename from example/ReactCounter.lua rename to example/ReactCounter.luau diff --git a/example/ReactCounter.story.lua b/example/ReactCounter.story.luau similarity index 100% rename from example/ReactCounter.story.lua rename to example/ReactCounter.story.luau index d43b6237..417bb6c3 100644 --- a/example/ReactCounter.story.lua +++ b/example/ReactCounter.story.luau @@ -1,8 +1,8 @@ local Example = script:FindFirstAncestor("Example") local React = require(Example.Parent.Packages.React) -local ReactRoblox = require(Example.Parent.Packages.ReactRoblox) local ReactCounter = require(script.Parent.ReactCounter) +local ReactRoblox = require(Example.Parent.Packages.ReactRoblox) local controls = { increment = 1, diff --git a/src/Common/Branding.lua b/src/Common/Branding.luau similarity index 100% rename from src/Common/Branding.lua rename to src/Common/Branding.luau index 19675c80..678138d5 100644 --- a/src/Common/Branding.lua +++ b/src/Common/Branding.luau @@ -1,9 +1,9 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) +local Sprite = require(flipbook.Common.Sprite) local assets = require(flipbook.assets) local useTheme = require(flipbook.Common.useTheme) -local Sprite = require(flipbook.Common.Sprite) local e = React.createElement diff --git a/src/Common/Branding.story.lua b/src/Common/Branding.story.luau similarity index 100% rename from src/Common/Branding.story.lua rename to src/Common/Branding.story.luau index cdf11ec6..13813e8e 100644 --- a/src/Common/Branding.story.lua +++ b/src/Common/Branding.story.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local Branding = require(script.Parent.Branding) +local React = require(flipbook.Packages.React) return { summary = "Icon and Typography for flipbook", diff --git a/src/Common/ScrollingFrame.lua b/src/Common/ScrollingFrame.luau similarity index 100% rename from src/Common/ScrollingFrame.lua rename to src/Common/ScrollingFrame.luau index 9c9f5021..1c5bc677 100644 --- a/src/Common/ScrollingFrame.lua +++ b/src/Common/ScrollingFrame.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local Sift = require(flipbook.Packages.Sift) local React = require(flipbook.Packages.React) +local Sift = require(flipbook.Packages.Sift) local useTheme = require(flipbook.Common.useTheme) export type Props = { diff --git a/src/Common/ScrollingFrame.story.lua b/src/Common/ScrollingFrame.story.luau similarity index 100% rename from src/Common/ScrollingFrame.story.lua rename to src/Common/ScrollingFrame.story.luau diff --git a/src/Common/Sprite.lua b/src/Common/Sprite.luau similarity index 100% rename from src/Common/Sprite.lua rename to src/Common/Sprite.luau diff --git a/src/Common/Sprite.story.lua b/src/Common/Sprite.story.luau similarity index 100% rename from src/Common/Sprite.story.lua rename to src/Common/Sprite.story.luau index 2bea94b8..954bedb0 100644 --- a/src/Common/Sprite.story.lua +++ b/src/Common/Sprite.story.luau @@ -1,8 +1,8 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local assets = require(flipbook.assets) local Sprite = require(script.Parent.Sprite) +local assets = require(flipbook.assets) return { story = React.createElement("Folder", {}, { diff --git a/src/Common/mapRanges.lua b/src/Common/mapRanges.luau similarity index 100% rename from src/Common/mapRanges.lua rename to src/Common/mapRanges.luau diff --git a/src/Common/mapRanges.spec.lua b/src/Common/mapRanges.spec.luau similarity index 100% rename from src/Common/mapRanges.spec.lua rename to src/Common/mapRanges.spec.luau diff --git a/src/Common/useDescendants.lua b/src/Common/useDescendants.luau similarity index 100% rename from src/Common/useDescendants.lua rename to src/Common/useDescendants.luau diff --git a/src/Common/useDescendants.spec.lua b/src/Common/useDescendants.spec.luau similarity index 100% rename from src/Common/useDescendants.spec.lua rename to src/Common/useDescendants.spec.luau diff --git a/src/Common/useEvent.lua b/src/Common/useEvent.luau similarity index 100% rename from src/Common/useEvent.lua rename to src/Common/useEvent.luau diff --git a/src/Common/useEvent.spec.lua b/src/Common/useEvent.spec.luau similarity index 100% rename from src/Common/useEvent.spec.lua rename to src/Common/useEvent.spec.luau diff --git a/src/Common/usePrevious.lua b/src/Common/usePrevious.luau similarity index 100% rename from src/Common/usePrevious.lua rename to src/Common/usePrevious.luau diff --git a/src/Common/usePrevious.spec.lua b/src/Common/usePrevious.spec.luau similarity index 100% rename from src/Common/usePrevious.spec.lua rename to src/Common/usePrevious.spec.luau diff --git a/src/Common/useTheme.lua b/src/Common/useTheme.luau similarity index 100% rename from src/Common/useTheme.lua rename to src/Common/useTheme.luau diff --git a/src/Common/useZoom.lua b/src/Common/useZoom.luau similarity index 100% rename from src/Common/useZoom.lua rename to src/Common/useZoom.luau diff --git a/src/Common/useZoom.spec.lua b/src/Common/useZoom.spec.luau similarity index 100% rename from src/Common/useZoom.spec.lua rename to src/Common/useZoom.spec.luau diff --git a/src/Explorer/Component.story.lua b/src/Explorer/Component.story.luau similarity index 100% rename from src/Explorer/Component.story.lua rename to src/Explorer/Component.story.luau diff --git a/src/Explorer/Component/Directory.lua b/src/Explorer/Component/Directory.luau similarity index 100% rename from src/Explorer/Component/Directory.lua rename to src/Explorer/Component/Directory.luau index 9d660088..9eb70191 100644 --- a/src/Explorer/Component/Directory.lua +++ b/src/Explorer/Component/Directory.luau @@ -2,11 +2,11 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) local ReactSpring = require(flipbook.Packages.ReactSpring) +local Sprite = require(flipbook.Common.Sprite) local assets = require(flipbook.assets) local constants = require(flipbook.constants) -local useTheme = require(flipbook.Common.useTheme) -local Sprite = require(flipbook.Common.Sprite) local types = require(flipbook.Explorer.types) +local useTheme = require(flipbook.Common.useTheme) local e = React.createElement diff --git a/src/Explorer/Component/Story.lua b/src/Explorer/Component/Story.luau similarity index 100% rename from src/Explorer/Component/Story.lua rename to src/Explorer/Component/Story.luau index ff3c2960..832575ef 100644 --- a/src/Explorer/Component/Story.lua +++ b/src/Explorer/Component/Story.luau @@ -2,11 +2,11 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) local ReactSpring = require(flipbook.Packages.ReactSpring) +local Sprite = require(flipbook.Common.Sprite) local assets = require(flipbook.assets) local constants = require(flipbook.constants) -local useTheme = require(flipbook.Common.useTheme) -local Sprite = require(flipbook.Common.Sprite) local types = require(flipbook.Explorer.types) +local useTheme = require(flipbook.Common.useTheme) local e = React.createElement diff --git a/src/Explorer/Component/init.lua b/src/Explorer/Component/init.luau similarity index 84% rename from src/Explorer/Component/init.lua rename to src/Explorer/Component/init.luau index b85b5fbf..31c6a215 100644 --- a/src/Explorer/Component/init.lua +++ b/src/Explorer/Component/init.luau @@ -1,11 +1,11 @@ local flipbook = script:FindFirstAncestor("flipbook") +local Directory = require(script.Directory) local React = require(flipbook.Packages.React) local Sift = require(flipbook.Packages.Sift) -local Directory = require(script.Directory) local Story = require(script.Story) +local filterComponentTreeNode = require(flipbook.Explorer.filterComponentTreeNode) local types = require(flipbook.Explorer.types) -local getTreeDescendants = require(flipbook.Explorer.getTreeDescendants) local e = React.createElement @@ -60,22 +60,8 @@ local function Component(providedProps: Props) end end - if props.filter then - if props.node.icon == "story" and not props.node.name:lower():match(props.filter:lower()) then - return - end - - local isEmpty = true - for _, descendant in getTreeDescendants(props.node) do - if descendant.name:lower():match(props.filter:lower()) then - isEmpty = false - break - end - end - - if isEmpty then - return - end + if props.filter and filterComponentTreeNode(props.node, props.filter) then + return end return e("Frame", { diff --git a/src/Explorer/filterComponentTreeNode.luau b/src/Explorer/filterComponentTreeNode.luau new file mode 100644 index 00000000..ff3bbc2a --- /dev/null +++ b/src/Explorer/filterComponentTreeNode.luau @@ -0,0 +1,27 @@ +local flipbook = script:FindFirstAncestor("flipbook") + +local types = require(flipbook.Explorer.types) + +local getTreeDescendants = require(script.Parent.getTreeDescendants) + +local function filterComponentTreeNode(node: types.ComponentTreeNode, filter: string): boolean + if node.icon == "story" then + if not node.name:lower():match(filter:lower()) then + return true + end + + return false + end + + local isEmpty = true + for _, descendant in getTreeDescendants(node) do + if descendant.name:lower():match(filter:lower()) then + isEmpty = false + break + end + end + + return isEmpty +end + +return filterComponentTreeNode diff --git a/src/Explorer/filterComponentTreeNode.spec.luau b/src/Explorer/filterComponentTreeNode.spec.luau new file mode 100644 index 00000000..d8edd6e2 --- /dev/null +++ b/src/Explorer/filterComponentTreeNode.spec.luau @@ -0,0 +1,77 @@ +local flipbook = script:FindFirstAncestor("flipbook") + +local types = require(flipbook.Explorer.types) + +return function() + local filterComponentTreeNode = require(script.Parent.filterComponentTreeNode) + + it("should return true when the query does not match the story name", function() + local target: types.ComponentTreeNode = { + children = {}, + name = "test", + icon = "story", + } + local query = "other" + + local result = filterComponentTreeNode(target, query) + expect(result).to.equal(true) + end) + + it("should return false the query matches the story name", function() + local target: types.ComponentTreeNode = { + children = {}, + name = "test", + icon = "story", + } + local query = "tes" + + local result = filterComponentTreeNode(target, query) + expect(result).to.equal(false) + end) + + it("should return true when the filter does not match any of node in tree", function() + local target: types.ComponentTreeNode = { + children = { + { + children = {}, + name = "test", + icon = "story", + }, + { + children = {}, + name = "folder", + icon = "folder", + }, + }, + name = "storybook", + icon = "storybook", + } + local query = "other" + + local result = filterComponentTreeNode(target, query) + expect(result).to.equal(true) + end) + + it("should return false when a filter match at least one of nodes in tree", function() + local target: types.ComponentTreeNode = { + children = { + { + children = {}, + name = "test", + icon = "story", + }, + { + children = {}, + name = "folder", + icon = "folder", + }, + }, + name = "storybook", + icon = "storybook", + } + local query = "tes" + + local result = filterComponentTreeNode(target, query) + expect(result).to.equal(false) + end) +end diff --git a/src/Explorer/getTreeDescendants.lua b/src/Explorer/getTreeDescendants.luau similarity index 100% rename from src/Explorer/getTreeDescendants.lua rename to src/Explorer/getTreeDescendants.luau diff --git a/src/Explorer/getTreeDescendants.spec.lua b/src/Explorer/getTreeDescendants.spec.luau similarity index 100% rename from src/Explorer/getTreeDescendants.spec.lua rename to src/Explorer/getTreeDescendants.spec.luau diff --git a/src/Explorer/init.lua b/src/Explorer/init.luau similarity index 100% rename from src/Explorer/init.lua rename to src/Explorer/init.luau index 1438525b..6e84c9e4 100644 --- a/src/Explorer/init.lua +++ b/src/Explorer/init.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local Component = require(script.Component) +local React = require(flipbook.Packages.React) local types = require(script.types) local e = React.createElement diff --git a/src/Explorer/types.lua b/src/Explorer/types.luau similarity index 87% rename from src/Explorer/types.lua rename to src/Explorer/types.luau index 9f22ebe7..706f7ae4 100644 --- a/src/Explorer/types.lua +++ b/src/Explorer/types.luau @@ -6,7 +6,7 @@ type Storybook = storybookTypes.Storybook export type ComponentTreeNode = { name: string, children: { ComponentTreeNode }, - icon: string?, + icon: ("folder" | "story" | "storybook")?, instance: Instance?, storybook: Storybook?, } diff --git a/src/Forms/Button.lua b/src/Forms/Button.luau similarity index 100% rename from src/Forms/Button.lua rename to src/Forms/Button.luau diff --git a/src/Forms/Button.story.lua b/src/Forms/Button.story.luau similarity index 100% rename from src/Forms/Button.story.lua rename to src/Forms/Button.story.luau index 9bd6acb3..4588385c 100644 --- a/src/Forms/Button.story.lua +++ b/src/Forms/Button.story.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local Button = require(script.Parent.Button) +local React = require(flipbook.Packages.React) local controls = { text = "Click me", diff --git a/src/Forms/Checkbox.lua b/src/Forms/Checkbox.luau similarity index 100% rename from src/Forms/Checkbox.lua rename to src/Forms/Checkbox.luau diff --git a/src/Forms/Checkbox.story.lua b/src/Forms/Checkbox.story.luau similarity index 100% rename from src/Forms/Checkbox.story.lua rename to src/Forms/Checkbox.story.luau index a8ef8dba..36c708c3 100644 --- a/src/Forms/Checkbox.story.lua +++ b/src/Forms/Checkbox.story.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local Checkbox = require(script.Parent.Checkbox) +local React = require(flipbook.Packages.React) return { summary = "Generic checkbox used for story controls", diff --git a/src/Forms/Dropdown.lua b/src/Forms/Dropdown.luau similarity index 100% rename from src/Forms/Dropdown.lua rename to src/Forms/Dropdown.luau diff --git a/src/Forms/Dropdown.story.lua b/src/Forms/Dropdown.story.luau similarity index 100% rename from src/Forms/Dropdown.story.lua rename to src/Forms/Dropdown.story.luau index 7c87fa85..2e4821c1 100644 --- a/src/Forms/Dropdown.story.lua +++ b/src/Forms/Dropdown.story.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local Dropdown = require(flipbook.Forms.Dropdown) +local React = require(flipbook.Packages.React) local controls = { useDefault = true, diff --git a/src/Forms/InputField.lua b/src/Forms/InputField.luau similarity index 100% rename from src/Forms/InputField.lua rename to src/Forms/InputField.luau diff --git a/src/Forms/InputField.story.lua b/src/Forms/InputField.story.luau similarity index 100% rename from src/Forms/InputField.story.lua rename to src/Forms/InputField.story.luau index c100e0bb..0c7ce07e 100644 --- a/src/Forms/InputField.story.lua +++ b/src/Forms/InputField.story.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local InputField = require(script.Parent.InputField) +local React = require(flipbook.Packages.React) return { story = React.createElement(InputField, { diff --git a/src/Forms/Searchbar.lua b/src/Forms/Searchbar.luau similarity index 100% rename from src/Forms/Searchbar.lua rename to src/Forms/Searchbar.luau index f14ecc29..7e24fd9e 100644 --- a/src/Forms/Searchbar.lua +++ b/src/Forms/Searchbar.luau @@ -1,14 +1,14 @@ local flipbook = script:FindFirstAncestor("flipbook") +local InputField = require(flipbook.Forms.InputField) local React = require(flipbook.Packages.React) local ReactSpring = require(flipbook.Packages.ReactSpring) local Sift = require(flipbook.Packages.Sift) +local Sprite = require(flipbook.Common.Sprite) local assets = require(flipbook.assets) local constants = require(flipbook.constants) -local useTheme = require(flipbook.Common.useTheme) local mapRanges = require(flipbook.Common.mapRanges) -local InputField = require(flipbook.Forms.InputField) -local Sprite = require(flipbook.Common.Sprite) +local useTheme = require(flipbook.Common.useTheme) local e = React.createElement diff --git a/src/Forms/Searchbar.story.lua b/src/Forms/Searchbar.story.luau similarity index 100% rename from src/Forms/Searchbar.story.lua rename to src/Forms/Searchbar.story.luau diff --git a/src/Forms/SelectableTextLabel.lua b/src/Forms/SelectableTextLabel.luau similarity index 100% rename from src/Forms/SelectableTextLabel.lua rename to src/Forms/SelectableTextLabel.luau diff --git a/src/Forms/SelectableTextLabel.story.lua b/src/Forms/SelectableTextLabel.story.luau similarity index 100% rename from src/Forms/SelectableTextLabel.story.lua rename to src/Forms/SelectableTextLabel.story.luau diff --git a/src/Navigation/Divider.lua b/src/Navigation/Divider.luau similarity index 100% rename from src/Navigation/Divider.lua rename to src/Navigation/Divider.luau diff --git a/src/Navigation/Element.lua b/src/Navigation/Element.luau similarity index 100% rename from src/Navigation/Element.lua rename to src/Navigation/Element.luau diff --git a/src/Navigation/Item.lua b/src/Navigation/Item.luau similarity index 100% rename from src/Navigation/Item.lua rename to src/Navigation/Item.luau diff --git a/src/Navigation/Items.lua b/src/Navigation/Items.luau similarity index 100% rename from src/Navigation/Items.lua rename to src/Navigation/Items.luau diff --git a/src/Navigation/init.lua b/src/Navigation/init.luau similarity index 100% rename from src/Navigation/init.lua rename to src/Navigation/init.luau diff --git a/src/Panels/DragHandle.lua b/src/Panels/DragHandle.luau similarity index 100% rename from src/Panels/DragHandle.lua rename to src/Panels/DragHandle.luau index c3e6f02c..6476d80d 100644 --- a/src/Panels/DragHandle.lua +++ b/src/Panels/DragHandle.luau @@ -2,9 +2,9 @@ local flipbook = script:FindFirstAncestor("flipbook") local RunService = game:GetService("RunService") -local Sift = require(flipbook.Packages.Sift) -local React = require(flipbook.Packages.React) local PluginContext = require(flipbook.Plugin.PluginContext) +local React = require(flipbook.Packages.React) +local Sift = require(flipbook.Packages.Sift) local types = require(flipbook.Panels.types) local defaultProps = { diff --git a/src/Panels/ResizablePanel.lua b/src/Panels/ResizablePanel.luau similarity index 100% rename from src/Panels/ResizablePanel.lua rename to src/Panels/ResizablePanel.luau index ac5441d4..21d5a4ba 100644 --- a/src/Panels/ResizablePanel.lua +++ b/src/Panels/ResizablePanel.luau @@ -1,8 +1,8 @@ local flipbook = script:FindFirstAncestor("flipbook") +local DragHandle = require(flipbook.Panels.DragHandle) local React = require(flipbook.Packages.React) local Sift = require(flipbook.Packages.Sift) -local DragHandle = require(flipbook.Panels.DragHandle) local types = require(flipbook.Panels.types) local defaultProps = { diff --git a/src/Panels/ResizablePanel.story.lua b/src/Panels/ResizablePanel.story.luau similarity index 100% rename from src/Panels/ResizablePanel.story.lua rename to src/Panels/ResizablePanel.story.luau diff --git a/src/Panels/Sidebar.lua b/src/Panels/Sidebar.luau similarity index 100% rename from src/Panels/Sidebar.lua rename to src/Panels/Sidebar.luau index 408e5016..255e1eeb 100644 --- a/src/Panels/Sidebar.lua +++ b/src/Panels/Sidebar.luau @@ -1,15 +1,15 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) -local constants = require(flipbook.constants) -local createStoryNodes = require(flipbook.Storybook.createStoryNodes) local Branding = require(flipbook.Common.Branding) local ComponentTree = require(flipbook.Explorer) -local Searchbar = require(flipbook.Forms.Searchbar) +local React = require(flipbook.Packages.React) local ScrollingFrame = require(flipbook.Common.ScrollingFrame) -local useTheme = require(flipbook.Common.useTheme) -local storybookTypes = require(flipbook.Storybook.types) +local Searchbar = require(flipbook.Forms.Searchbar) +local constants = require(flipbook.constants) +local createStoryNodes = require(flipbook.Storybook.createStoryNodes) local explorerTypes = require(flipbook.Explorer.types) +local storybookTypes = require(flipbook.Storybook.types) +local useTheme = require(flipbook.Common.useTheme) type Storybook = storybookTypes.Storybook type ComponentTreeNode = explorerTypes.ComponentTreeNode diff --git a/src/Panels/Sidebar.story.lua b/src/Panels/Sidebar.story.luau similarity index 100% rename from src/Panels/Sidebar.story.lua rename to src/Panels/Sidebar.story.luau index b332bb49..b4ca2a09 100644 --- a/src/Panels/Sidebar.story.lua +++ b/src/Panels/Sidebar.story.luau @@ -1,8 +1,8 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local internalStorybook = require(flipbook["init.storybook"]) local Sidebar = require(script.Parent.Sidebar) +local internalStorybook = require(flipbook["init.storybook"]) return { summary = "Sidebar containing brand, searchbar, and component tree", diff --git a/src/Panels/types.lua b/src/Panels/types.luau similarity index 100% rename from src/Panels/types.lua rename to src/Panels/types.luau diff --git a/src/Plugin/PluginApp.lua b/src/Plugin/PluginApp.luau similarity index 100% rename from src/Plugin/PluginApp.lua rename to src/Plugin/PluginApp.luau index ae341fe1..6f4abc74 100644 --- a/src/Plugin/PluginApp.lua +++ b/src/Plugin/PluginApp.luau @@ -1,13 +1,13 @@ local flipbook = script:FindFirstAncestor("flipbook") +local PluginContext = require(flipbook.Plugin.PluginContext) local React = require(flipbook.Packages.React) +local ResizablePanel = require(flipbook.Panels.ResizablePanel) +local Sidebar = require(flipbook.Panels.Sidebar) +local StoryCanvas = require(flipbook.Storybook.StoryCanvas) local constants = require(flipbook.constants) local useStorybooks = require(flipbook.Storybook.useStorybooks) local useTheme = require(flipbook.Common.useTheme) -local PluginContext = require(flipbook.Plugin.PluginContext) -local ResizablePanel = require(flipbook.Panels.ResizablePanel) -local StoryCanvas = require(flipbook.Storybook.StoryCanvas) -local Sidebar = require(flipbook.Panels.Sidebar) export type Props = { plugin: Plugin, diff --git a/src/Plugin/PluginApp.story.lua b/src/Plugin/PluginApp.story.luau similarity index 100% rename from src/Plugin/PluginApp.story.lua rename to src/Plugin/PluginApp.story.luau index 32aef06e..5d1efe65 100644 --- a/src/Plugin/PluginApp.story.lua +++ b/src/Plugin/PluginApp.story.luau @@ -1,8 +1,8 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local ModuleLoader = require(flipbook.Packages.ModuleLoader) local PluginApp = require(script.Parent.PluginApp) +local React = require(flipbook.Packages.React) return { summary = "The main component that handles the entire plugin", diff --git a/src/Plugin/PluginContext.lua b/src/Plugin/PluginContext.luau similarity index 100% rename from src/Plugin/PluginContext.lua rename to src/Plugin/PluginContext.luau diff --git a/src/Plugin/createToggleButton.lua b/src/Plugin/createToggleButton.luau similarity index 100% rename from src/Plugin/createToggleButton.lua rename to src/Plugin/createToggleButton.luau diff --git a/src/Plugin/createWidget.lua b/src/Plugin/createWidget.luau similarity index 100% rename from src/Plugin/createWidget.lua rename to src/Plugin/createWidget.luau diff --git a/src/Storybook/NoStorySelected.lua b/src/Storybook/NoStorySelected.luau similarity index 100% rename from src/Storybook/NoStorySelected.lua rename to src/Storybook/NoStorySelected.luau index b59a48e7..78849b05 100644 --- a/src/Storybook/NoStorySelected.lua +++ b/src/Storybook/NoStorySelected.luau @@ -1,9 +1,9 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) +local Sprite = require(flipbook.Common.Sprite) local assets = require(flipbook.assets) local useTheme = require(flipbook.Common.useTheme) -local Sprite = require(flipbook.Common.Sprite) local e = React.createElement diff --git a/src/Storybook/NoStorySelected.story.lua b/src/Storybook/NoStorySelected.story.luau similarity index 100% rename from src/Storybook/NoStorySelected.story.lua rename to src/Storybook/NoStorySelected.story.luau index f47cdbe8..ecd6f764 100644 --- a/src/Storybook/NoStorySelected.story.lua +++ b/src/Storybook/NoStorySelected.story.luau @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) local NoStorySelected = require(script.Parent.NoStorySelected) +local React = require(flipbook.Packages.React) return { story = React.createElement(NoStorySelected), diff --git a/src/Storybook/StoryCanvas.lua b/src/Storybook/StoryCanvas.luau similarity index 100% rename from src/Storybook/StoryCanvas.lua rename to src/Storybook/StoryCanvas.luau index 18dc5f84..f91dff6b 100644 --- a/src/Storybook/StoryCanvas.lua +++ b/src/Storybook/StoryCanvas.luau @@ -1,9 +1,9 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) -local types = require(flipbook.Storybook.types) local NoStorySelected = require(flipbook.Storybook.NoStorySelected) +local React = require(flipbook.Packages.React) local StoryView = require(flipbook.Storybook.StoryView) +local types = require(flipbook.Storybook.types) local useTheme = require(flipbook.Common.useTheme) local e = React.createElement diff --git a/src/Storybook/StoryControls.lua b/src/Storybook/StoryControls.luau similarity index 100% rename from src/Storybook/StoryControls.lua rename to src/Storybook/StoryControls.luau index b0d55ce1..bed36eab 100644 --- a/src/Storybook/StoryControls.lua +++ b/src/Storybook/StoryControls.luau @@ -2,10 +2,10 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local useTheme = require(flipbook.Common.useTheme) -local InputField = require(flipbook.Forms.InputField) local Checkbox = require(flipbook.Forms.Checkbox) local Dropdown = require(flipbook.Forms.Dropdown) +local InputField = require(flipbook.Forms.InputField) +local useTheme = require(flipbook.Common.useTheme) local e = React.createElement diff --git a/src/Storybook/StoryControls.story.lua b/src/Storybook/StoryControls.story.luau similarity index 100% rename from src/Storybook/StoryControls.story.lua rename to src/Storybook/StoryControls.story.luau diff --git a/src/Storybook/StoryError.lua b/src/Storybook/StoryError.luau similarity index 100% rename from src/Storybook/StoryError.lua rename to src/Storybook/StoryError.luau diff --git a/src/Storybook/StoryError.story.lua b/src/Storybook/StoryError.story.luau similarity index 100% rename from src/Storybook/StoryError.story.lua rename to src/Storybook/StoryError.story.luau diff --git a/src/Storybook/StoryMeta.lua b/src/Storybook/StoryMeta.luau similarity index 100% rename from src/Storybook/StoryMeta.lua rename to src/Storybook/StoryMeta.luau diff --git a/src/Storybook/StoryMeta.story.lua b/src/Storybook/StoryMeta.story.luau similarity index 100% rename from src/Storybook/StoryMeta.story.lua rename to src/Storybook/StoryMeta.story.luau diff --git a/src/Storybook/StoryPreview.lua b/src/Storybook/StoryPreview.luau similarity index 100% rename from src/Storybook/StoryPreview.lua rename to src/Storybook/StoryPreview.luau index 86e709e8..a4a704d8 100644 --- a/src/Storybook/StoryPreview.lua +++ b/src/Storybook/StoryPreview.luau @@ -4,11 +4,11 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) local ReactRoblox = require(flipbook.Packages.ReactRoblox) +local ScrollingFrame = require(flipbook.Common.ScrollingFrame) local Sift = require(flipbook.Packages.Sift) local StoryError = require(flipbook.Storybook.StoryError) -local ScrollingFrame = require(flipbook.Common.ScrollingFrame) -local types = require(flipbook.Storybook.types) local mountStory = require(flipbook.Storybook.mountStory) +local types = require(flipbook.Storybook.types) local e = React.createElement diff --git a/src/Storybook/StoryView.lua b/src/Storybook/StoryView.luau similarity index 100% rename from src/Storybook/StoryView.lua rename to src/Storybook/StoryView.luau index b54b63fb..608daa7e 100644 --- a/src/Storybook/StoryView.lua +++ b/src/Storybook/StoryView.luau @@ -2,21 +2,21 @@ local flipbook = script:FindFirstAncestor("flipbook") local Selection = game:GetService("Selection") -local Sift = require(flipbook.Packages.Sift) +local PluginContext = require(flipbook.Plugin.PluginContext) local React = require(flipbook.Packages.React) +local ResizablePanel = require(flipbook.Panels.ResizablePanel) +local ScrollingFrame = require(flipbook.Common.ScrollingFrame) +local Sift = require(flipbook.Packages.Sift) +local StoryControls = require(flipbook.Storybook.StoryControls) +local StoryError = require(flipbook.Storybook.StoryError) +local StoryMeta = require(flipbook.Storybook.StoryMeta) +local StoryPreview = require(flipbook.Storybook.StoryPreview) +local StoryViewNavbar = require(flipbook.Storybook.StoryViewNavbar) local constants = require(flipbook.constants) local types = require(flipbook.Storybook.types) local useStory = require(flipbook.Storybook.useStory) local useTheme = require(flipbook.Common.useTheme) local useZoom = require(flipbook.Common.useZoom) -local StoryViewNavbar = require(flipbook.Storybook.StoryViewNavbar) -local StoryControls = require(flipbook.Storybook.StoryControls) -local StoryMeta = require(flipbook.Storybook.StoryMeta) -local StoryPreview = require(flipbook.Storybook.StoryPreview) -local StoryError = require(flipbook.Storybook.StoryError) -local ResizablePanel = require(flipbook.Panels.ResizablePanel) -local ScrollingFrame = require(flipbook.Common.ScrollingFrame) -local PluginContext = require(flipbook.Plugin.PluginContext) local e = React.createElement diff --git a/src/Storybook/StoryViewNavbar.lua b/src/Storybook/StoryViewNavbar.luau similarity index 100% rename from src/Storybook/StoryViewNavbar.lua rename to src/Storybook/StoryViewNavbar.luau index d56acc81..0516a62b 100644 --- a/src/Storybook/StoryViewNavbar.lua +++ b/src/Storybook/StoryViewNavbar.luau @@ -1,9 +1,9 @@ local flipbook = script:FindFirstAncestor("flipbook") -local React = require(flipbook.Packages.React) -local assets = require(flipbook.assets) local Navigation = require(flipbook.Navigation) +local React = require(flipbook.Packages.React) local Sprite = require(flipbook.Common.Sprite) +local assets = require(flipbook.assets) local useTheme = require(flipbook.Common.useTheme) local e = React.createElement diff --git a/src/Storybook/createStoryNodes.lua b/src/Storybook/createStoryNodes.luau similarity index 100% rename from src/Storybook/createStoryNodes.lua rename to src/Storybook/createStoryNodes.luau index 83cf7dee..ce38c8f7 100644 --- a/src/Storybook/createStoryNodes.lua +++ b/src/Storybook/createStoryNodes.luau @@ -1,8 +1,8 @@ local flipbook = script:FindFirstAncestor("flipbook") +local explorerTypes = require(flipbook.Explorer.types) local isStoryModule = require(flipbook.Storybook.isStoryModule) local storybookTypes = require(flipbook.Storybook.types) -local explorerTypes = require(flipbook.Explorer.types) type Storybook = storybookTypes.Storybook type ComponentTreeNode = explorerTypes.ComponentTreeNode diff --git a/src/Storybook/createStoryNodes.spec.lua b/src/Storybook/createStoryNodes.spec.luau similarity index 100% rename from src/Storybook/createStoryNodes.spec.lua rename to src/Storybook/createStoryNodes.spec.luau diff --git a/src/Storybook/isStoryModule.lua b/src/Storybook/isStoryModule.luau similarity index 100% rename from src/Storybook/isStoryModule.lua rename to src/Storybook/isStoryModule.luau diff --git a/src/Storybook/isStoryModule.spec.lua b/src/Storybook/isStoryModule.spec.luau similarity index 100% rename from src/Storybook/isStoryModule.spec.lua rename to src/Storybook/isStoryModule.spec.luau diff --git a/src/Storybook/isStorybookModule.lua b/src/Storybook/isStorybookModule.luau similarity index 100% rename from src/Storybook/isStorybookModule.lua rename to src/Storybook/isStorybookModule.luau diff --git a/src/Storybook/isStorybookModule.spec.lua b/src/Storybook/isStorybookModule.spec.luau similarity index 100% rename from src/Storybook/isStorybookModule.spec.lua rename to src/Storybook/isStorybookModule.spec.luau diff --git a/src/Storybook/loadStoryModule.lua b/src/Storybook/loadStoryModule.luau similarity index 100% rename from src/Storybook/loadStoryModule.lua rename to src/Storybook/loadStoryModule.luau diff --git a/src/Storybook/mountStory.lua b/src/Storybook/mountStory.luau similarity index 100% rename from src/Storybook/mountStory.lua rename to src/Storybook/mountStory.luau diff --git a/src/Storybook/types.lua b/src/Storybook/types.luau similarity index 100% rename from src/Storybook/types.lua rename to src/Storybook/types.luau diff --git a/src/Storybook/useStory.lua b/src/Storybook/useStory.luau similarity index 100% rename from src/Storybook/useStory.lua rename to src/Storybook/useStory.luau index e1da0929..f209e4bf 100644 --- a/src/Storybook/useStory.lua +++ b/src/Storybook/useStory.luau @@ -1,8 +1,8 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local types = require(flipbook.Storybook.types) local loadStoryModule = require(flipbook.Storybook.loadStoryModule) +local types = require(flipbook.Storybook.types) local function useStory(module: ModuleScript, storybook: types.Storybook, loader: any): (types.Story?, string?) local state, setState = React.useState({ diff --git a/src/Storybook/useStorybooks.lua b/src/Storybook/useStorybooks.luau similarity index 100% rename from src/Storybook/useStorybooks.lua rename to src/Storybook/useStorybooks.luau index 6aad1426..af94ecc6 100644 --- a/src/Storybook/useStorybooks.lua +++ b/src/Storybook/useStorybooks.luau @@ -2,8 +2,8 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) local constants = require(flipbook.constants) -local types = require(flipbook.Storybook.types) local isStorybookModule = require(flipbook.Storybook.isStorybookModule) +local types = require(flipbook.Storybook.types) local useDescendants = require(flipbook.Common.useDescendants) local function hasPermission(instance: Instance) diff --git a/src/Testing/newFolder.lua b/src/Testing/newFolder.luau similarity index 100% rename from src/Testing/newFolder.lua rename to src/Testing/newFolder.luau diff --git a/src/Testing/newFolder.spec.lua b/src/Testing/newFolder.spec.luau similarity index 100% rename from src/Testing/newFolder.spec.lua rename to src/Testing/newFolder.spec.luau diff --git a/src/assets.lua b/src/assets.luau similarity index 100% rename from src/assets.lua rename to src/assets.luau diff --git a/src/constants.lua b/src/constants.luau similarity index 100% rename from src/constants.lua rename to src/constants.luau diff --git a/src/init.server.lua b/src/init.server.luau similarity index 100% rename from src/init.server.lua rename to src/init.server.luau index 17fc85bf..7f945180 100644 --- a/src/init.server.lua +++ b/src/init.server.luau @@ -7,12 +7,12 @@ if RunService:IsRunning() or not RunService:IsEdit() then end local ModuleLoader = require(flipbook.Packages.ModuleLoader) +local PluginApp = require(flipbook.Plugin.PluginApp) local React = require(flipbook.Packages.React) local ReactRoblox = require(flipbook.Packages.ReactRoblox) -local createWidget = require(flipbook.Plugin.createWidget) -local createToggleButton = require(flipbook.Plugin.createToggleButton) -local PluginApp = require(flipbook.Plugin.PluginApp) local constants = require(flipbook.constants) +local createToggleButton = require(flipbook.Plugin.createToggleButton) +local createWidget = require(flipbook.Plugin.createWidget) local PLUGIN_NAME = "flipbook" diff --git a/src/init.storybook.lua b/src/init.storybook.luau similarity index 100% rename from src/init.storybook.lua rename to src/init.storybook.luau diff --git a/src/stories.spec.lua b/src/stories.spec.luau similarity index 100% rename from src/stories.spec.lua rename to src/stories.spec.luau diff --git a/src/tailwind.lua b/src/tailwind.luau similarity index 100% rename from src/tailwind.lua rename to src/tailwind.luau diff --git a/src/themes.lua b/src/themes.luau similarity index 100% rename from src/themes.lua rename to src/themes.luau diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 00000000..ed2de717 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,2 @@ +[sort_requires] +enabled = true diff --git a/tarmac.toml b/tarmac.toml index 481a184b..8fc90ad4 100644 --- a/tarmac.toml +++ b/tarmac.toml @@ -3,6 +3,6 @@ name = "flipbook" [[inputs]] glob = "img/**/*.png" codegen = true -codegen-path = "src/assets.lua" +codegen-path = "src/assets.luau" codegen-base-path = "img" packable = true diff --git a/testez.d.lua b/testez.d.luau similarity index 100% rename from testez.d.lua rename to testez.d.luau diff --git a/tests/init.server.lua b/tests/init.server.luau similarity index 100% rename from tests/init.server.lua rename to tests/init.server.luau