From beda00f5f792e1fd5671c24dbce38eb63a771249 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Fri, 3 May 2019 16:56:11 -0700 Subject: [PATCH] Rename lib -> src folder --- .luacov | 2 +- CONTRIBUTING.md | 2 +- README.md | 4 ++-- bin/bench.lua | 2 +- bin/spec.lua | 2 +- place.project.json | 2 +- rotriever.toml | 2 +- {lib => src}/Binding.lua | 0 {lib => src}/Binding.spec.lua | 0 {lib => src}/Component.lua | 0 {lib => src}/Component.spec/context.spec.lua | 0 {lib => src}/Component.spec/defaultProps.spec.lua | 0 {lib => src}/Component.spec/didMount.spec.lua | 0 {lib => src}/Component.spec/didUpdate.spec.lua | 0 {lib => src}/Component.spec/extend.spec.lua | 0 {lib => src}/Component.spec/getDerivedStateFromProps.spec.lua | 0 {lib => src}/Component.spec/getElementTraceback.spec.lua | 0 {lib => src}/Component.spec/init.spec.lua | 0 {lib => src}/Component.spec/render.spec.lua | 0 {lib => src}/Component.spec/setState.spec.lua | 0 {lib => src}/Component.spec/shouldUpdate.spec.lua | 0 {lib => src}/Component.spec/validateProps.spec.lua | 0 {lib => src}/Component.spec/willUnmount.spec.lua | 0 {lib => src}/Component.spec/willUpdate.spec.lua | 0 {lib => src}/ComponentLifecyclePhase.lua | 0 {lib => src}/Config.lua | 0 {lib => src}/Config.spec.lua | 0 {lib => src}/ElementKind.lua | 0 {lib => src}/ElementKind.spec.lua | 0 {lib => src}/ElementUtils.lua | 0 {lib => src}/ElementUtils.spec.lua | 0 {lib => src}/GlobalConfig.lua | 0 {lib => src}/GlobalConfig.spec.lua | 0 {lib => src}/Logging.lua | 0 {lib => src}/None.lua | 0 {lib => src}/NoopRenderer.lua | 0 {lib => src}/Portal.lua | 0 {lib => src}/PropMarkers/Change.lua | 0 {lib => src}/PropMarkers/Change.spec.lua | 0 {lib => src}/PropMarkers/Children.lua | 0 {lib => src}/PropMarkers/Event.lua | 0 {lib => src}/PropMarkers/Event.spec.lua | 0 {lib => src}/PropMarkers/Ref.lua | 0 {lib => src}/PureComponent.lua | 0 {lib => src}/PureComponent.spec.lua | 0 {lib => src}/RobloxRenderer.lua | 0 {lib => src}/RobloxRenderer.spec.lua | 0 {lib => src}/SingleEventManager.lua | 0 {lib => src}/SingleEventManager.spec.lua | 0 {lib => src}/Symbol.lua | 0 {lib => src}/Symbol.spec.lua | 0 {lib => src}/Type.lua | 0 {lib => src}/Type.spec.lua | 0 {lib => src}/assertDeepEqual.lua | 0 {lib => src}/assertDeepEqual.spec.lua | 0 {lib => src}/assign.lua | 0 {lib => src}/assign.spec.lua | 0 {lib => src}/createElement.lua | 0 {lib => src}/createElement.spec.lua | 0 {lib => src}/createFragment.lua | 0 {lib => src}/createReconciler.lua | 0 {lib => src}/createReconciler.spec.lua | 0 {lib => src}/createReconcilerCompat.lua | 0 {lib => src}/createReconcilerCompat.spec.lua | 0 {lib => src}/createRef.lua | 0 {lib => src}/createRef.spec.lua | 0 {lib => src}/createSignal.lua | 0 {lib => src}/createSignal.spec.lua | 0 {lib => src}/createSpy.lua | 0 {lib => src}/createSpy.spec.lua | 0 {lib => src}/getDefaultInstanceProperty.lua | 0 {lib => src}/getDefaultInstanceProperty.spec.lua | 0 {lib => src}/init.lua | 0 {lib => src}/init.spec.lua | 0 {lib => src}/internalAssert.lua | 0 {lib => src}/invalidSetStateMessages.lua | 0 {lib => src}/oneChild.lua | 0 {lib => src}/oneChild.spec.lua | 0 {lib => src}/strict.lua | 0 {lib => src}/strict.spec.lua | 0 80 files changed, 8 insertions(+), 8 deletions(-) rename {lib => src}/Binding.lua (100%) rename {lib => src}/Binding.spec.lua (100%) rename {lib => src}/Component.lua (100%) rename {lib => src}/Component.spec/context.spec.lua (100%) rename {lib => src}/Component.spec/defaultProps.spec.lua (100%) rename {lib => src}/Component.spec/didMount.spec.lua (100%) rename {lib => src}/Component.spec/didUpdate.spec.lua (100%) rename {lib => src}/Component.spec/extend.spec.lua (100%) rename {lib => src}/Component.spec/getDerivedStateFromProps.spec.lua (100%) rename {lib => src}/Component.spec/getElementTraceback.spec.lua (100%) rename {lib => src}/Component.spec/init.spec.lua (100%) rename {lib => src}/Component.spec/render.spec.lua (100%) rename {lib => src}/Component.spec/setState.spec.lua (100%) rename {lib => src}/Component.spec/shouldUpdate.spec.lua (100%) rename {lib => src}/Component.spec/validateProps.spec.lua (100%) rename {lib => src}/Component.spec/willUnmount.spec.lua (100%) rename {lib => src}/Component.spec/willUpdate.spec.lua (100%) rename {lib => src}/ComponentLifecyclePhase.lua (100%) rename {lib => src}/Config.lua (100%) rename {lib => src}/Config.spec.lua (100%) rename {lib => src}/ElementKind.lua (100%) rename {lib => src}/ElementKind.spec.lua (100%) rename {lib => src}/ElementUtils.lua (100%) rename {lib => src}/ElementUtils.spec.lua (100%) rename {lib => src}/GlobalConfig.lua (100%) rename {lib => src}/GlobalConfig.spec.lua (100%) rename {lib => src}/Logging.lua (100%) rename {lib => src}/None.lua (100%) rename {lib => src}/NoopRenderer.lua (100%) rename {lib => src}/Portal.lua (100%) rename {lib => src}/PropMarkers/Change.lua (100%) rename {lib => src}/PropMarkers/Change.spec.lua (100%) rename {lib => src}/PropMarkers/Children.lua (100%) rename {lib => src}/PropMarkers/Event.lua (100%) rename {lib => src}/PropMarkers/Event.spec.lua (100%) rename {lib => src}/PropMarkers/Ref.lua (100%) rename {lib => src}/PureComponent.lua (100%) rename {lib => src}/PureComponent.spec.lua (100%) rename {lib => src}/RobloxRenderer.lua (100%) rename {lib => src}/RobloxRenderer.spec.lua (100%) rename {lib => src}/SingleEventManager.lua (100%) rename {lib => src}/SingleEventManager.spec.lua (100%) rename {lib => src}/Symbol.lua (100%) rename {lib => src}/Symbol.spec.lua (100%) rename {lib => src}/Type.lua (100%) rename {lib => src}/Type.spec.lua (100%) rename {lib => src}/assertDeepEqual.lua (100%) rename {lib => src}/assertDeepEqual.spec.lua (100%) rename {lib => src}/assign.lua (100%) rename {lib => src}/assign.spec.lua (100%) rename {lib => src}/createElement.lua (100%) rename {lib => src}/createElement.spec.lua (100%) rename {lib => src}/createFragment.lua (100%) rename {lib => src}/createReconciler.lua (100%) rename {lib => src}/createReconciler.spec.lua (100%) rename {lib => src}/createReconcilerCompat.lua (100%) rename {lib => src}/createReconcilerCompat.spec.lua (100%) rename {lib => src}/createRef.lua (100%) rename {lib => src}/createRef.spec.lua (100%) rename {lib => src}/createSignal.lua (100%) rename {lib => src}/createSignal.spec.lua (100%) rename {lib => src}/createSpy.lua (100%) rename {lib => src}/createSpy.spec.lua (100%) rename {lib => src}/getDefaultInstanceProperty.lua (100%) rename {lib => src}/getDefaultInstanceProperty.spec.lua (100%) rename {lib => src}/init.lua (100%) rename {lib => src}/init.spec.lua (100%) rename {lib => src}/internalAssert.lua (100%) rename {lib => src}/invalidSetStateMessages.lua (100%) rename {lib => src}/oneChild.lua (100%) rename {lib => src}/oneChild.spec.lua (100%) rename {lib => src}/strict.lua (100%) rename {lib => src}/strict.spec.lua (100%) diff --git a/.luacov b/.luacov index 46b2abe6..996d3cc0 100644 --- a/.luacov +++ b/.luacov @@ -1,6 +1,6 @@ return { include = { - "^lib", + "^src", }, exclude = { "%.spec$", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77d12280..7d6cbcc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,7 +70,7 @@ Add a link to your pull request in the entry. We don't need to link to the relat ### Luacheck We use [Luacheck](https://github.com/mpeterv/luacheck) for static analysis of Lua on all of our projects. -From the command line, just run `luacheck lib` to check the Roact source. +From the command line, just run `luacheck src` to check the Roact source. You should get it working on your system, and then get a plugin for the editor you use. There are plugins available for most popular editors! diff --git a/README.md b/README.md index eb05e902..43c8b19c 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ ## Installation ### Method 1: Model File (Roblox Studio) -* Download the `rbxmx` model file attached to the latest release from the [GitHub releases page](https://github.com/Roblox/Roact/releases). +* Download the `rbxm` model file attached to the latest release from the [GitHub releases page](https://github.com/Roblox/Roact/releases). * Insert the model into Studio into a place like `ReplicatedStorage` ### Method 2: Filesystem -* Copy the `lib` directory into your codebase +* Copy the `src` directory into your codebase * Rename the folder to `Roact` * Use a plugin like [Rojo](https://github.com/LPGhatguy/rojo) to sync the files into a place diff --git a/bin/bench.lua b/bin/bench.lua index 02991882..4dcbecfb 100644 --- a/bin/bench.lua +++ b/bin/bench.lua @@ -4,7 +4,7 @@ -- If you add any dependencies, add them to this table so they'll be loaded! local LOAD_MODULES = { - {"lib", "Roact"}, + {"src", "Roact"}, } -- This makes sure we can load Lemur and other libraries that depend on init.lua diff --git a/bin/spec.lua b/bin/spec.lua index caa18198..b6d0f792 100644 --- a/bin/spec.lua +++ b/bin/spec.lua @@ -4,7 +4,7 @@ -- If you add any dependencies, add them to this table so they'll be loaded! local LOAD_MODULES = { - {"lib", "Roact"}, + {"src", "Roact"}, {"modules/testez/lib", "TestEZ"}, } diff --git a/place.project.json b/place.project.json index 6baafd87..e4513286 100644 --- a/place.project.json +++ b/place.project.json @@ -7,7 +7,7 @@ "$className": "ReplicatedStorage", "Roact": { - "$path": "lib" + "$path": "src" }, "TestEZ": { diff --git a/rotriever.toml b/rotriever.toml index f08d37a2..81ac4afd 100644 --- a/rotriever.toml +++ b/rotriever.toml @@ -1,5 +1,5 @@ name = "Roact" author = "Roblox" license = "Apache-2.0" -content_root = "lib" +content_root = "src" version = "0.2.0" \ No newline at end of file diff --git a/lib/Binding.lua b/src/Binding.lua similarity index 100% rename from lib/Binding.lua rename to src/Binding.lua diff --git a/lib/Binding.spec.lua b/src/Binding.spec.lua similarity index 100% rename from lib/Binding.spec.lua rename to src/Binding.spec.lua diff --git a/lib/Component.lua b/src/Component.lua similarity index 100% rename from lib/Component.lua rename to src/Component.lua diff --git a/lib/Component.spec/context.spec.lua b/src/Component.spec/context.spec.lua similarity index 100% rename from lib/Component.spec/context.spec.lua rename to src/Component.spec/context.spec.lua diff --git a/lib/Component.spec/defaultProps.spec.lua b/src/Component.spec/defaultProps.spec.lua similarity index 100% rename from lib/Component.spec/defaultProps.spec.lua rename to src/Component.spec/defaultProps.spec.lua diff --git a/lib/Component.spec/didMount.spec.lua b/src/Component.spec/didMount.spec.lua similarity index 100% rename from lib/Component.spec/didMount.spec.lua rename to src/Component.spec/didMount.spec.lua diff --git a/lib/Component.spec/didUpdate.spec.lua b/src/Component.spec/didUpdate.spec.lua similarity index 100% rename from lib/Component.spec/didUpdate.spec.lua rename to src/Component.spec/didUpdate.spec.lua diff --git a/lib/Component.spec/extend.spec.lua b/src/Component.spec/extend.spec.lua similarity index 100% rename from lib/Component.spec/extend.spec.lua rename to src/Component.spec/extend.spec.lua diff --git a/lib/Component.spec/getDerivedStateFromProps.spec.lua b/src/Component.spec/getDerivedStateFromProps.spec.lua similarity index 100% rename from lib/Component.spec/getDerivedStateFromProps.spec.lua rename to src/Component.spec/getDerivedStateFromProps.spec.lua diff --git a/lib/Component.spec/getElementTraceback.spec.lua b/src/Component.spec/getElementTraceback.spec.lua similarity index 100% rename from lib/Component.spec/getElementTraceback.spec.lua rename to src/Component.spec/getElementTraceback.spec.lua diff --git a/lib/Component.spec/init.spec.lua b/src/Component.spec/init.spec.lua similarity index 100% rename from lib/Component.spec/init.spec.lua rename to src/Component.spec/init.spec.lua diff --git a/lib/Component.spec/render.spec.lua b/src/Component.spec/render.spec.lua similarity index 100% rename from lib/Component.spec/render.spec.lua rename to src/Component.spec/render.spec.lua diff --git a/lib/Component.spec/setState.spec.lua b/src/Component.spec/setState.spec.lua similarity index 100% rename from lib/Component.spec/setState.spec.lua rename to src/Component.spec/setState.spec.lua diff --git a/lib/Component.spec/shouldUpdate.spec.lua b/src/Component.spec/shouldUpdate.spec.lua similarity index 100% rename from lib/Component.spec/shouldUpdate.spec.lua rename to src/Component.spec/shouldUpdate.spec.lua diff --git a/lib/Component.spec/validateProps.spec.lua b/src/Component.spec/validateProps.spec.lua similarity index 100% rename from lib/Component.spec/validateProps.spec.lua rename to src/Component.spec/validateProps.spec.lua diff --git a/lib/Component.spec/willUnmount.spec.lua b/src/Component.spec/willUnmount.spec.lua similarity index 100% rename from lib/Component.spec/willUnmount.spec.lua rename to src/Component.spec/willUnmount.spec.lua diff --git a/lib/Component.spec/willUpdate.spec.lua b/src/Component.spec/willUpdate.spec.lua similarity index 100% rename from lib/Component.spec/willUpdate.spec.lua rename to src/Component.spec/willUpdate.spec.lua diff --git a/lib/ComponentLifecyclePhase.lua b/src/ComponentLifecyclePhase.lua similarity index 100% rename from lib/ComponentLifecyclePhase.lua rename to src/ComponentLifecyclePhase.lua diff --git a/lib/Config.lua b/src/Config.lua similarity index 100% rename from lib/Config.lua rename to src/Config.lua diff --git a/lib/Config.spec.lua b/src/Config.spec.lua similarity index 100% rename from lib/Config.spec.lua rename to src/Config.spec.lua diff --git a/lib/ElementKind.lua b/src/ElementKind.lua similarity index 100% rename from lib/ElementKind.lua rename to src/ElementKind.lua diff --git a/lib/ElementKind.spec.lua b/src/ElementKind.spec.lua similarity index 100% rename from lib/ElementKind.spec.lua rename to src/ElementKind.spec.lua diff --git a/lib/ElementUtils.lua b/src/ElementUtils.lua similarity index 100% rename from lib/ElementUtils.lua rename to src/ElementUtils.lua diff --git a/lib/ElementUtils.spec.lua b/src/ElementUtils.spec.lua similarity index 100% rename from lib/ElementUtils.spec.lua rename to src/ElementUtils.spec.lua diff --git a/lib/GlobalConfig.lua b/src/GlobalConfig.lua similarity index 100% rename from lib/GlobalConfig.lua rename to src/GlobalConfig.lua diff --git a/lib/GlobalConfig.spec.lua b/src/GlobalConfig.spec.lua similarity index 100% rename from lib/GlobalConfig.spec.lua rename to src/GlobalConfig.spec.lua diff --git a/lib/Logging.lua b/src/Logging.lua similarity index 100% rename from lib/Logging.lua rename to src/Logging.lua diff --git a/lib/None.lua b/src/None.lua similarity index 100% rename from lib/None.lua rename to src/None.lua diff --git a/lib/NoopRenderer.lua b/src/NoopRenderer.lua similarity index 100% rename from lib/NoopRenderer.lua rename to src/NoopRenderer.lua diff --git a/lib/Portal.lua b/src/Portal.lua similarity index 100% rename from lib/Portal.lua rename to src/Portal.lua diff --git a/lib/PropMarkers/Change.lua b/src/PropMarkers/Change.lua similarity index 100% rename from lib/PropMarkers/Change.lua rename to src/PropMarkers/Change.lua diff --git a/lib/PropMarkers/Change.spec.lua b/src/PropMarkers/Change.spec.lua similarity index 100% rename from lib/PropMarkers/Change.spec.lua rename to src/PropMarkers/Change.spec.lua diff --git a/lib/PropMarkers/Children.lua b/src/PropMarkers/Children.lua similarity index 100% rename from lib/PropMarkers/Children.lua rename to src/PropMarkers/Children.lua diff --git a/lib/PropMarkers/Event.lua b/src/PropMarkers/Event.lua similarity index 100% rename from lib/PropMarkers/Event.lua rename to src/PropMarkers/Event.lua diff --git a/lib/PropMarkers/Event.spec.lua b/src/PropMarkers/Event.spec.lua similarity index 100% rename from lib/PropMarkers/Event.spec.lua rename to src/PropMarkers/Event.spec.lua diff --git a/lib/PropMarkers/Ref.lua b/src/PropMarkers/Ref.lua similarity index 100% rename from lib/PropMarkers/Ref.lua rename to src/PropMarkers/Ref.lua diff --git a/lib/PureComponent.lua b/src/PureComponent.lua similarity index 100% rename from lib/PureComponent.lua rename to src/PureComponent.lua diff --git a/lib/PureComponent.spec.lua b/src/PureComponent.spec.lua similarity index 100% rename from lib/PureComponent.spec.lua rename to src/PureComponent.spec.lua diff --git a/lib/RobloxRenderer.lua b/src/RobloxRenderer.lua similarity index 100% rename from lib/RobloxRenderer.lua rename to src/RobloxRenderer.lua diff --git a/lib/RobloxRenderer.spec.lua b/src/RobloxRenderer.spec.lua similarity index 100% rename from lib/RobloxRenderer.spec.lua rename to src/RobloxRenderer.spec.lua diff --git a/lib/SingleEventManager.lua b/src/SingleEventManager.lua similarity index 100% rename from lib/SingleEventManager.lua rename to src/SingleEventManager.lua diff --git a/lib/SingleEventManager.spec.lua b/src/SingleEventManager.spec.lua similarity index 100% rename from lib/SingleEventManager.spec.lua rename to src/SingleEventManager.spec.lua diff --git a/lib/Symbol.lua b/src/Symbol.lua similarity index 100% rename from lib/Symbol.lua rename to src/Symbol.lua diff --git a/lib/Symbol.spec.lua b/src/Symbol.spec.lua similarity index 100% rename from lib/Symbol.spec.lua rename to src/Symbol.spec.lua diff --git a/lib/Type.lua b/src/Type.lua similarity index 100% rename from lib/Type.lua rename to src/Type.lua diff --git a/lib/Type.spec.lua b/src/Type.spec.lua similarity index 100% rename from lib/Type.spec.lua rename to src/Type.spec.lua diff --git a/lib/assertDeepEqual.lua b/src/assertDeepEqual.lua similarity index 100% rename from lib/assertDeepEqual.lua rename to src/assertDeepEqual.lua diff --git a/lib/assertDeepEqual.spec.lua b/src/assertDeepEqual.spec.lua similarity index 100% rename from lib/assertDeepEqual.spec.lua rename to src/assertDeepEqual.spec.lua diff --git a/lib/assign.lua b/src/assign.lua similarity index 100% rename from lib/assign.lua rename to src/assign.lua diff --git a/lib/assign.spec.lua b/src/assign.spec.lua similarity index 100% rename from lib/assign.spec.lua rename to src/assign.spec.lua diff --git a/lib/createElement.lua b/src/createElement.lua similarity index 100% rename from lib/createElement.lua rename to src/createElement.lua diff --git a/lib/createElement.spec.lua b/src/createElement.spec.lua similarity index 100% rename from lib/createElement.spec.lua rename to src/createElement.spec.lua diff --git a/lib/createFragment.lua b/src/createFragment.lua similarity index 100% rename from lib/createFragment.lua rename to src/createFragment.lua diff --git a/lib/createReconciler.lua b/src/createReconciler.lua similarity index 100% rename from lib/createReconciler.lua rename to src/createReconciler.lua diff --git a/lib/createReconciler.spec.lua b/src/createReconciler.spec.lua similarity index 100% rename from lib/createReconciler.spec.lua rename to src/createReconciler.spec.lua diff --git a/lib/createReconcilerCompat.lua b/src/createReconcilerCompat.lua similarity index 100% rename from lib/createReconcilerCompat.lua rename to src/createReconcilerCompat.lua diff --git a/lib/createReconcilerCompat.spec.lua b/src/createReconcilerCompat.spec.lua similarity index 100% rename from lib/createReconcilerCompat.spec.lua rename to src/createReconcilerCompat.spec.lua diff --git a/lib/createRef.lua b/src/createRef.lua similarity index 100% rename from lib/createRef.lua rename to src/createRef.lua diff --git a/lib/createRef.spec.lua b/src/createRef.spec.lua similarity index 100% rename from lib/createRef.spec.lua rename to src/createRef.spec.lua diff --git a/lib/createSignal.lua b/src/createSignal.lua similarity index 100% rename from lib/createSignal.lua rename to src/createSignal.lua diff --git a/lib/createSignal.spec.lua b/src/createSignal.spec.lua similarity index 100% rename from lib/createSignal.spec.lua rename to src/createSignal.spec.lua diff --git a/lib/createSpy.lua b/src/createSpy.lua similarity index 100% rename from lib/createSpy.lua rename to src/createSpy.lua diff --git a/lib/createSpy.spec.lua b/src/createSpy.spec.lua similarity index 100% rename from lib/createSpy.spec.lua rename to src/createSpy.spec.lua diff --git a/lib/getDefaultInstanceProperty.lua b/src/getDefaultInstanceProperty.lua similarity index 100% rename from lib/getDefaultInstanceProperty.lua rename to src/getDefaultInstanceProperty.lua diff --git a/lib/getDefaultInstanceProperty.spec.lua b/src/getDefaultInstanceProperty.spec.lua similarity index 100% rename from lib/getDefaultInstanceProperty.spec.lua rename to src/getDefaultInstanceProperty.spec.lua diff --git a/lib/init.lua b/src/init.lua similarity index 100% rename from lib/init.lua rename to src/init.lua diff --git a/lib/init.spec.lua b/src/init.spec.lua similarity index 100% rename from lib/init.spec.lua rename to src/init.spec.lua diff --git a/lib/internalAssert.lua b/src/internalAssert.lua similarity index 100% rename from lib/internalAssert.lua rename to src/internalAssert.lua diff --git a/lib/invalidSetStateMessages.lua b/src/invalidSetStateMessages.lua similarity index 100% rename from lib/invalidSetStateMessages.lua rename to src/invalidSetStateMessages.lua diff --git a/lib/oneChild.lua b/src/oneChild.lua similarity index 100% rename from lib/oneChild.lua rename to src/oneChild.lua diff --git a/lib/oneChild.spec.lua b/src/oneChild.spec.lua similarity index 100% rename from lib/oneChild.spec.lua rename to src/oneChild.spec.lua diff --git a/lib/strict.lua b/src/strict.lua similarity index 100% rename from lib/strict.lua rename to src/strict.lua diff --git a/lib/strict.spec.lua b/src/strict.spec.lua similarity index 100% rename from lib/strict.spec.lua rename to src/strict.spec.lua