From ba1764ffc2cdc36003adfa2ededd8b94f5df3514 Mon Sep 17 00:00:00 2001 From: hy2k <17329720+hy2k@users.noreply.github.com> Date: Mon, 8 Apr 2024 03:01:48 +0900 Subject: [PATCH 1/2] Patch for Search Filtering Feature (#237) # Problem This PR is a continuation of the work done in PR #231. It aims to address the incomplete fix I implemented in my previous PR. The problem addressed by this PR pertains to the handling of 'story' nodes in our component tree. In the current implementation, 'story' nodes, which inherently do not have any children, are incorrectly subjected to a descendants check. This results in the `isEmpty` flag always being set to true for 'Story' nodes. # Solution The main changes in this PR include: - Refactoring the search filtering logic into a separate module. - Adding unit tests While the changes introduced in this PR could have been implemented within the existing component, I chose to refactor them into a separate module, so it's easier to test. # Checklist - [x] Ran `./bin/test.sh` locally - [x] Ran `./bin/analyze.sh` locally --------- Co-authored-by: Marin Minnerly --- src/Explorer/Component/init.lua | 20 +---- src/Explorer/filterComponentTreeNode.lua | 27 +++++++ src/Explorer/filterComponentTreeNode.spec.lua | 77 +++++++++++++++++++ src/Explorer/types.lua | 2 +- 4 files changed, 108 insertions(+), 18 deletions(-) create mode 100644 src/Explorer/filterComponentTreeNode.lua create mode 100644 src/Explorer/filterComponentTreeNode.spec.lua diff --git a/src/Explorer/Component/init.lua b/src/Explorer/Component/init.lua index b85b5fbf..03e7a27d 100644 --- a/src/Explorer/Component/init.lua +++ b/src/Explorer/Component/init.lua @@ -5,7 +5,7 @@ local Sift = require(flipbook.Packages.Sift) local Directory = require(script.Directory) local Story = require(script.Story) local types = require(flipbook.Explorer.types) -local getTreeDescendants = require(flipbook.Explorer.getTreeDescendants) +local filterComponentTreeNode = require(flipbook.Explorer.filterComponentTreeNode) 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.lua b/src/Explorer/filterComponentTreeNode.lua new file mode 100644 index 00000000..ff3bbc2a --- /dev/null +++ b/src/Explorer/filterComponentTreeNode.lua @@ -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.lua b/src/Explorer/filterComponentTreeNode.spec.lua new file mode 100644 index 00000000..d8edd6e2 --- /dev/null +++ b/src/Explorer/filterComponentTreeNode.spec.lua @@ -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/types.lua b/src/Explorer/types.lua index 9f22ebe7..706f7ae4 100644 --- a/src/Explorer/types.lua +++ b/src/Explorer/types.lua @@ -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?, } From 2a742e5386b1d95d20afad3ad7592ef2bc167544 Mon Sep 17 00:00:00 2001 From: vocksel Date: Thu, 11 Apr 2024 09:19:55 -0700 Subject: [PATCH 2/2] Rename all Lua files to Luau (#238) 1. Renamed `.lua` files to `.luau` 2. Updated files that _refer_ to `.lua` files to use `.luau` 3. Added .gitattributes to tell GitHub to use Lua syntax highlighting for Luau files --- .gitattributes | 1 + .github/workflows/ci.yml | 3 +++ .github/workflows/release.yml | 2 +- bin/analyze.sh | 2 +- bin/lint.sh | 11 +++++++++++ bin/test.sh | 2 +- docs/contributing.md | 2 +- docs/migrating.md | 16 ++++++++-------- docs/story-format.md | 12 ++++++------ docs/writing-stories.md | 16 ++++++++-------- ...ntrols.story.lua => ArrayControls.story.luau} | 0 example/{Button.lua => Button.luau} | 0 example/{Button.story.lua => Button.story.luau} | 0 ...nWithControls.lua => ButtonWithControls.luau} | 0 ...s.story.lua => ButtonWithControls.story.luau} | 0 ...icSize.story.lua => AutomaticSize.story.luau} | 0 ...lua => AutomaticSizeExceedsBounds.story.luau} | 0 .../{Offset.story.lua => Offset.story.luau} | 0 .../{Resizing.story.lua => Resizing.story.luau} | 0 .../{Scale.story.lua => Scale.story.luau} | 0 ...Frame.story.lua => ScrollingFrame.story.luau} | 0 example/{Counter.lua => Counter.luau} | 0 .../{Counter.story.lua => Counter.story.luau} | 0 ...mple.storybook.lua => Example.storybook.luau} | 0 ...unctional.story.lua => Functional.story.luau} | 0 ...{Hoarcekat.story.lua => Hoarcekat.story.luau} | 0 example/{ReactCounter.lua => ReactCounter.luau} | 0 ...Counter.story.lua => ReactCounter.story.luau} | 0 src/Common/{Branding.lua => Branding.luau} | 0 .../{Branding.story.lua => Branding.story.luau} | 0 .../{ScrollingFrame.lua => ScrollingFrame.luau} | 0 ...Frame.story.lua => ScrollingFrame.story.luau} | 0 src/Common/{Sprite.lua => Sprite.luau} | 0 .../{Sprite.story.lua => Sprite.story.luau} | 0 src/Common/{mapRanges.lua => mapRanges.luau} | 0 .../{mapRanges.spec.lua => mapRanges.spec.luau} | 0 .../{useDescendants.lua => useDescendants.luau} | 0 ...endants.spec.lua => useDescendants.spec.luau} | 0 src/Common/{useEvent.lua => useEvent.luau} | 0 .../{useEvent.spec.lua => useEvent.spec.luau} | 0 src/Common/{usePrevious.lua => usePrevious.luau} | 0 ...sePrevious.spec.lua => usePrevious.spec.luau} | 0 src/Common/{useTheme.lua => useTheme.luau} | 0 src/Common/{useZoom.lua => useZoom.luau} | 0 .../{useZoom.spec.lua => useZoom.spec.luau} | 0 ...{Component.story.lua => Component.story.luau} | 0 .../Component/{Directory.lua => Directory.luau} | 0 src/Explorer/Component/{Story.lua => Story.luau} | 0 src/Explorer/Component/{init.lua => init.luau} | 0 ...TreeNode.lua => filterComponentTreeNode.luau} | 0 ...pec.lua => filterComponentTreeNode.spec.luau} | 0 ...eeDescendants.lua => getTreeDescendants.luau} | 0 ...nts.spec.lua => getTreeDescendants.spec.luau} | 0 src/Explorer/{init.lua => init.luau} | 0 src/Explorer/{types.lua => types.luau} | 0 src/Forms/{Button.lua => Button.luau} | 0 .../{Button.story.lua => Button.story.luau} | 0 src/Forms/{Checkbox.lua => Checkbox.luau} | 0 .../{Checkbox.story.lua => Checkbox.story.luau} | 0 src/Forms/{Dropdown.lua => Dropdown.luau} | 0 .../{Dropdown.story.lua => Dropdown.story.luau} | 0 src/Forms/{InputField.lua => InputField.luau} | 0 ...nputField.story.lua => InputField.story.luau} | 0 src/Forms/{Searchbar.lua => Searchbar.luau} | 0 ...{Searchbar.story.lua => Searchbar.story.luau} | 0 ...bleTextLabel.lua => SelectableTextLabel.luau} | 0 ....story.lua => SelectableTextLabel.story.luau} | 0 src/Navigation/{Divider.lua => Divider.luau} | 0 src/Navigation/{Element.lua => Element.luau} | 0 src/Navigation/{Item.lua => Item.luau} | 0 src/Navigation/{Items.lua => Items.luau} | 0 src/Navigation/{init.lua => init.luau} | 0 src/Panels/{DragHandle.lua => DragHandle.luau} | 0 .../{ResizablePanel.lua => ResizablePanel.luau} | 0 ...Panel.story.lua => ResizablePanel.story.luau} | 0 src/Panels/{Sidebar.lua => Sidebar.luau} | 0 .../{Sidebar.story.lua => Sidebar.story.luau} | 0 src/Panels/{types.lua => types.luau} | 0 src/Plugin/{PluginApp.lua => PluginApp.luau} | 0 ...{PluginApp.story.lua => PluginApp.story.luau} | 0 .../{PluginContext.lua => PluginContext.luau} | 0 ...eToggleButton.lua => createToggleButton.luau} | 0 .../{createWidget.lua => createWidget.luau} | 0 ...{NoStorySelected.lua => NoStorySelected.luau} | 0 ...cted.story.lua => NoStorySelected.story.luau} | 0 .../{StoryCanvas.lua => StoryCanvas.luau} | 0 .../{StoryControls.lua => StoryControls.luau} | 0 ...ntrols.story.lua => StoryControls.story.luau} | 0 .../{StoryError.lua => StoryError.luau} | 0 ...toryError.story.lua => StoryError.story.luau} | 0 src/Storybook/{StoryMeta.lua => StoryMeta.luau} | 0 ...{StoryMeta.story.lua => StoryMeta.story.luau} | 0 .../{StoryPreview.lua => StoryPreview.luau} | 0 src/Storybook/{StoryView.lua => StoryView.luau} | 0 ...{StoryViewNavbar.lua => StoryViewNavbar.luau} | 0 ...reateStoryNodes.lua => createStoryNodes.luau} | 0 ...Nodes.spec.lua => createStoryNodes.spec.luau} | 0 .../{isStoryModule.lua => isStoryModule.luau} | 0 ...ryModule.spec.lua => isStoryModule.spec.luau} | 0 ...torybookModule.lua => isStorybookModule.luau} | 0 ...dule.spec.lua => isStorybookModule.spec.luau} | 0 ...{loadStoryModule.lua => loadStoryModule.luau} | 0 .../{mountStory.lua => mountStory.luau} | 0 src/Storybook/{types.lua => types.luau} | 0 src/Storybook/{useStory.lua => useStory.luau} | 0 .../{useStorybooks.lua => useStorybooks.luau} | 0 src/Testing/{newFolder.lua => newFolder.luau} | 0 .../{newFolder.spec.lua => newFolder.spec.luau} | 0 src/{assets.lua => assets.luau} | 0 src/{constants.lua => constants.luau} | 0 src/{init.server.lua => init.server.luau} | 0 src/{init.storybook.lua => init.storybook.luau} | 0 src/{stories.spec.lua => stories.spec.luau} | 0 src/{tailwind.lua => tailwind.luau} | 0 src/{themes.lua => themes.luau} | 0 tarmac.toml | 2 +- testez.d.lua => testez.d.luau | 0 tests/{init.server.lua => init.server.luau} | 0 118 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 .gitattributes create mode 100755 bin/lint.sh rename example/{ArrayControls.story.lua => ArrayControls.story.luau} (100%) rename example/{Button.lua => Button.luau} (100%) rename example/{Button.story.lua => Button.story.luau} (100%) rename example/{ButtonWithControls.lua => ButtonWithControls.luau} (100%) rename example/{ButtonWithControls.story.lua => ButtonWithControls.story.luau} (100%) rename example/CanvasTests/{AutomaticSize.story.lua => AutomaticSize.story.luau} (100%) rename example/CanvasTests/{AutomaticSizeExceedsBounds.story.lua => AutomaticSizeExceedsBounds.story.luau} (100%) rename example/CanvasTests/{Offset.story.lua => Offset.story.luau} (100%) rename example/CanvasTests/{Resizing.story.lua => Resizing.story.luau} (100%) rename example/CanvasTests/{Scale.story.lua => Scale.story.luau} (100%) rename example/CanvasTests/{ScrollingFrame.story.lua => ScrollingFrame.story.luau} (100%) rename example/{Counter.lua => Counter.luau} (100%) rename example/{Counter.story.lua => Counter.story.luau} (100%) rename example/{Example.storybook.lua => Example.storybook.luau} (100%) rename example/{Functional.story.lua => Functional.story.luau} (100%) rename example/{Hoarcekat.story.lua => Hoarcekat.story.luau} (100%) rename example/{ReactCounter.lua => ReactCounter.luau} (100%) rename example/{ReactCounter.story.lua => ReactCounter.story.luau} (100%) rename src/Common/{Branding.lua => Branding.luau} (100%) rename src/Common/{Branding.story.lua => Branding.story.luau} (100%) rename src/Common/{ScrollingFrame.lua => ScrollingFrame.luau} (100%) rename src/Common/{ScrollingFrame.story.lua => ScrollingFrame.story.luau} (100%) rename src/Common/{Sprite.lua => Sprite.luau} (100%) rename src/Common/{Sprite.story.lua => Sprite.story.luau} (100%) rename src/Common/{mapRanges.lua => mapRanges.luau} (100%) rename src/Common/{mapRanges.spec.lua => mapRanges.spec.luau} (100%) rename src/Common/{useDescendants.lua => useDescendants.luau} (100%) rename src/Common/{useDescendants.spec.lua => useDescendants.spec.luau} (100%) rename src/Common/{useEvent.lua => useEvent.luau} (100%) rename src/Common/{useEvent.spec.lua => useEvent.spec.luau} (100%) rename src/Common/{usePrevious.lua => usePrevious.luau} (100%) rename src/Common/{usePrevious.spec.lua => usePrevious.spec.luau} (100%) rename src/Common/{useTheme.lua => useTheme.luau} (100%) rename src/Common/{useZoom.lua => useZoom.luau} (100%) rename src/Common/{useZoom.spec.lua => useZoom.spec.luau} (100%) rename src/Explorer/{Component.story.lua => Component.story.luau} (100%) rename src/Explorer/Component/{Directory.lua => Directory.luau} (100%) rename src/Explorer/Component/{Story.lua => Story.luau} (100%) rename src/Explorer/Component/{init.lua => init.luau} (100%) rename src/Explorer/{filterComponentTreeNode.lua => filterComponentTreeNode.luau} (100%) rename src/Explorer/{filterComponentTreeNode.spec.lua => filterComponentTreeNode.spec.luau} (100%) rename src/Explorer/{getTreeDescendants.lua => getTreeDescendants.luau} (100%) rename src/Explorer/{getTreeDescendants.spec.lua => getTreeDescendants.spec.luau} (100%) rename src/Explorer/{init.lua => init.luau} (100%) rename src/Explorer/{types.lua => types.luau} (100%) rename src/Forms/{Button.lua => Button.luau} (100%) rename src/Forms/{Button.story.lua => Button.story.luau} (100%) rename src/Forms/{Checkbox.lua => Checkbox.luau} (100%) rename src/Forms/{Checkbox.story.lua => Checkbox.story.luau} (100%) rename src/Forms/{Dropdown.lua => Dropdown.luau} (100%) rename src/Forms/{Dropdown.story.lua => Dropdown.story.luau} (100%) rename src/Forms/{InputField.lua => InputField.luau} (100%) rename src/Forms/{InputField.story.lua => InputField.story.luau} (100%) rename src/Forms/{Searchbar.lua => Searchbar.luau} (100%) rename src/Forms/{Searchbar.story.lua => Searchbar.story.luau} (100%) rename src/Forms/{SelectableTextLabel.lua => SelectableTextLabel.luau} (100%) rename src/Forms/{SelectableTextLabel.story.lua => SelectableTextLabel.story.luau} (100%) rename src/Navigation/{Divider.lua => Divider.luau} (100%) rename src/Navigation/{Element.lua => Element.luau} (100%) rename src/Navigation/{Item.lua => Item.luau} (100%) rename src/Navigation/{Items.lua => Items.luau} (100%) rename src/Navigation/{init.lua => init.luau} (100%) rename src/Panels/{DragHandle.lua => DragHandle.luau} (100%) rename src/Panels/{ResizablePanel.lua => ResizablePanel.luau} (100%) rename src/Panels/{ResizablePanel.story.lua => ResizablePanel.story.luau} (100%) rename src/Panels/{Sidebar.lua => Sidebar.luau} (100%) rename src/Panels/{Sidebar.story.lua => Sidebar.story.luau} (100%) rename src/Panels/{types.lua => types.luau} (100%) rename src/Plugin/{PluginApp.lua => PluginApp.luau} (100%) rename src/Plugin/{PluginApp.story.lua => PluginApp.story.luau} (100%) rename src/Plugin/{PluginContext.lua => PluginContext.luau} (100%) rename src/Plugin/{createToggleButton.lua => createToggleButton.luau} (100%) rename src/Plugin/{createWidget.lua => createWidget.luau} (100%) rename src/Storybook/{NoStorySelected.lua => NoStorySelected.luau} (100%) rename src/Storybook/{NoStorySelected.story.lua => NoStorySelected.story.luau} (100%) rename src/Storybook/{StoryCanvas.lua => StoryCanvas.luau} (100%) rename src/Storybook/{StoryControls.lua => StoryControls.luau} (100%) rename src/Storybook/{StoryControls.story.lua => StoryControls.story.luau} (100%) rename src/Storybook/{StoryError.lua => StoryError.luau} (100%) rename src/Storybook/{StoryError.story.lua => StoryError.story.luau} (100%) rename src/Storybook/{StoryMeta.lua => StoryMeta.luau} (100%) rename src/Storybook/{StoryMeta.story.lua => StoryMeta.story.luau} (100%) rename src/Storybook/{StoryPreview.lua => StoryPreview.luau} (100%) rename src/Storybook/{StoryView.lua => StoryView.luau} (100%) rename src/Storybook/{StoryViewNavbar.lua => StoryViewNavbar.luau} (100%) rename src/Storybook/{createStoryNodes.lua => createStoryNodes.luau} (100%) rename src/Storybook/{createStoryNodes.spec.lua => createStoryNodes.spec.luau} (100%) rename src/Storybook/{isStoryModule.lua => isStoryModule.luau} (100%) rename src/Storybook/{isStoryModule.spec.lua => isStoryModule.spec.luau} (100%) rename src/Storybook/{isStorybookModule.lua => isStorybookModule.luau} (100%) rename src/Storybook/{isStorybookModule.spec.lua => isStorybookModule.spec.luau} (100%) rename src/Storybook/{loadStoryModule.lua => loadStoryModule.luau} (100%) rename src/Storybook/{mountStory.lua => mountStory.luau} (100%) rename src/Storybook/{types.lua => types.luau} (100%) rename src/Storybook/{useStory.lua => useStory.luau} (100%) rename src/Storybook/{useStorybooks.lua => useStorybooks.luau} (100%) rename src/Testing/{newFolder.lua => newFolder.luau} (100%) rename src/Testing/{newFolder.spec.lua => newFolder.spec.luau} (100%) rename src/{assets.lua => assets.luau} (100%) rename src/{constants.lua => constants.luau} (100%) rename src/{init.server.lua => init.server.luau} (100%) rename src/{init.storybook.lua => init.storybook.luau} (100%) rename src/{stories.spec.lua => stories.spec.luau} (100%) rename src/{tailwind.lua => tailwind.luau} (100%) rename src/{themes.lua => themes.luau} (100%) rename testez.d.lua => testez.d.luau (100%) rename tests/{init.server.lua => init.server.luau} (100%) 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/contributing.md b/docs/contributing.md index 47657f2b..0dfc0aca 100644 --- a/docs/contributing.md +++ b/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/migrating.md b/docs/migrating.md index 3c0a9d28..cd5926be 100644 --- a/docs/migrating.md +++ b/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/story-format.md b/docs/story-format.md index 48ba562d..d6836425 100644 --- a/docs/story-format.md +++ b/docs/story-format.md @@ -23,7 +23,7 @@ The only required prop is the `storyRoots` array, which tells flipbook which Ins Example: ```lua --- example/Example.storybook.lua +-- example/Example.storybook.luau return { name = "Example Storybook", storyRoots = { @@ -47,7 +47,7 @@ Support for Roblox's [Roact](https://github.com/Roblox/roact) library is built i Example: ```lua --- example/Button.story.lua +-- example/Button.story.luau local Example = script:FindFirstAncestor("Example") local Roact = require(Example.Parent.Packages.Roact) @@ -68,7 +68,7 @@ return { Example with controls: ```lua --- example/ButtonWithControls.story.lua +-- example/ButtonWithControls.story.luau local Example = script:FindFirstAncestor("Example") local Roact = require(Example.Parent.Packages.Roact) @@ -116,7 +116,7 @@ You can find React and ReactRoblox as part of the [CorePackages](https://github. Example: ```lua --- example/ReactCounter.story.lua +-- example/ReactCounter.story.luau local Example = script:FindFirstAncestor("Example") local React = require(Example.Parent.Packages.React) @@ -160,7 +160,7 @@ A Functional story uses a function to create and mount UI. This is the most flex Example: ```lua --- example/Functional.story.lua +-- example/Functional.story.luau local controls = { text = "Functional Story", } @@ -206,7 +206,7 @@ See the [migration guide](migrating.md) for more info. Example: ```lua --- example/Hoarcekat.story.lua +-- example/Hoarcekat.story.luau local Example = script:FindFirstAncestor("Example") local Roact = require(Example.Parent.Packages.Roact) diff --git a/docs/writing-stories.md b/docs/writing-stories.md index 8b8ff709..3703f2f5 100644 --- a/docs/writing-stories.md +++ b/docs/writing-stories.md @@ -8,17 +8,17 @@ 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 --- src/ProjectName.storybook.lua +-- src/ProjectName.storybook.luau --- Make sure to adjust the path to Roact if needed +-- Make sure to adjust the path to Roact if needed local Roact = require(path.to.Roact) return { roact = Roact, - storyRoots = { + storyRoots = { script.Parent.Components } } @@ -30,10 +30,10 @@ 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 --- src/Components/Button.lua +-- src/Components/Button.luau local Roact = require(path.to.Roact) @@ -68,7 +68,7 @@ return Button And now let's write the story to mount the Button component: ```lua --- src/Components/Button.story.lua +-- src/Components/Button.story.luau local Roact = require(path.to.Roact) local Button = require(script.Parent.Button) @@ -185,4 +185,4 @@ With this change, a new "Controls" panel will appear where you can toggle the `i You have just been given an example of how to create a storybook and a story for a Button component that makes use of flipbook's controls feature. This document outlines the biggest features of flipbook, but there are other options you can play around with. -Check out [Story Format](story-format.md) next to learn about all the options you have available. \ No newline at end of file +Check out [Story Format](story-format.md) next to learn about all the options you have available. 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 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 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 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 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 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 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 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 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 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/init.lua b/src/Explorer/Component/init.luau similarity index 100% rename from src/Explorer/Component/init.lua rename to src/Explorer/Component/init.luau diff --git a/src/Explorer/filterComponentTreeNode.lua b/src/Explorer/filterComponentTreeNode.luau similarity index 100% rename from src/Explorer/filterComponentTreeNode.lua rename to src/Explorer/filterComponentTreeNode.luau diff --git a/src/Explorer/filterComponentTreeNode.spec.lua b/src/Explorer/filterComponentTreeNode.spec.luau similarity index 100% rename from src/Explorer/filterComponentTreeNode.spec.lua rename to src/Explorer/filterComponentTreeNode.spec.luau 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 diff --git a/src/Explorer/types.lua b/src/Explorer/types.luau similarity index 100% rename from src/Explorer/types.lua rename to src/Explorer/types.luau 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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/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