mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update require paths to relative string
This commit is contained in:
parent
0897821e1f
commit
5abd5eee91
25 changed files with 89 additions and 124 deletions
|
|
@ -1,13 +1,12 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
local typeof = game and typeof or require "test/mock".typeof :: never
|
||||
local Vector2 = game and Vector2 or require "test/mock".Vector2 :: never
|
||||
local UDim2 = game and UDim2 or require "test/mock".UDim2 :: never
|
||||
local typeof = game and typeof or require "../test/mock".typeof :: never
|
||||
local Vector2 = game and Vector2 or require "../test/mock".Vector2 :: never
|
||||
local UDim2 = game and UDim2 or require "../test/mock".UDim2 :: never
|
||||
|
||||
local flags = require(script.Parent.flags)
|
||||
local throw = require(script.Parent.throw)
|
||||
local bind = require(script.Parent.bind)
|
||||
local _, is_action = require(script.Parent.action)()
|
||||
local graph = require(script.Parent.graph)
|
||||
local flags = require "./flags"
|
||||
local throw = require "./throw"
|
||||
local bind = require "./bind"
|
||||
local _, is_action = require "./action"()
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
|
||||
type Array<V> = { V }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local flags = require(script.Parent.flags)
|
||||
local throw = require(script.Parent.throw)
|
||||
local graph = require(script.Parent.graph)
|
||||
local flags = require "./flags"
|
||||
local throw = require "./throw"
|
||||
local graph = require "./graph"
|
||||
|
||||
local function batch(setter: () -> ())
|
||||
local already_batching = flags.batch
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
local create_node = graph.create_node
|
||||
local assert_stable_scope = graph.assert_stable_scope
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local action = require(script.Parent.action)()
|
||||
local cleanup = require(script.Parent.cleanup)
|
||||
local action = require "./action"()
|
||||
local cleanup = require "./cleanup"
|
||||
|
||||
local function changed<T>(property: string, callback: (T) -> ())
|
||||
return action(function(instance)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
local typeof = game and typeof or require "test/mock".typeof :: never
|
||||
local typeof = game and typeof or require "../test/mock".typeof :: never
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local graph = require(script.Parent.graph)
|
||||
local throw = require "./throw"
|
||||
local graph = require "./graph"
|
||||
local get_scope = graph.get_scope
|
||||
local push_cleanup = graph.push_cleanup
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
if not game then script = require "../test/relative-string" end
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local graph = require(script.Parent.graph)
|
||||
local throw = require "./throw"
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
local create_node = graph.create_node
|
||||
local get_scope = graph.get_scope
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
local typeof = game and typeof or require "test/mock".typeof:: never
|
||||
local Instance = game and Instance or require "test/mock".Instance :: never
|
||||
if not game then script = require "../test/relative-string" end
|
||||
local typeof = game and typeof or require "../test/mock".typeof :: never
|
||||
local Instance = game and Instance or require "../test/mock".Instance :: never
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local defaults = require(script.Parent.defaults)
|
||||
local apply = require(script.Parent.apply)
|
||||
local throw = require "./throw"
|
||||
local defaults = require "./defaults"
|
||||
local apply = require "./apply"
|
||||
|
||||
local ctor_cache = {} :: { [string]: () -> Instance }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
local Enum = game and Enum or require "test/mock".Enum :: never
|
||||
local Color3 = game and Color3 or require "test/mock".Color3 :: never
|
||||
local Vector3 = game and Vector3 or require "test/mock".Vector3 :: never
|
||||
local Enum = game and Enum or require "../test/mock".Enum :: never
|
||||
local Color3 = game and Color3 or require "../test/mock".Color3 :: never
|
||||
local Vector3 = game and Vector3 or require "../test/mock".Vector3 :: never
|
||||
|
||||
return {
|
||||
Part = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local graph = require "./graph"
|
||||
local create_node = graph.create_node
|
||||
local push_child_to_scope = graph.push_child_to_scope
|
||||
local assert_stable_scope = graph.assert_stable_scope
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local graph = require "./graph"
|
||||
local create_node = graph.create_node
|
||||
local assert_stable_scope = graph.assert_stable_scope
|
||||
local evaluate_node = graph.evaluate_node
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local flags = require(script.Parent.flags)
|
||||
local throw = require "./throw"
|
||||
local flags = require "./flags"
|
||||
|
||||
export type SourceNode<T> = {
|
||||
cache: T,
|
||||
|
|
|
|||
|
|
@ -4,28 +4,26 @@
|
|||
|
||||
local version = { major = 0, minor = 3, patch = 1 }
|
||||
|
||||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local root = require(script.root)
|
||||
local mount = require(script.mount)
|
||||
local create = require(script.create)
|
||||
local apply = require(script.apply)
|
||||
local source = require(script.source)
|
||||
local effect = require(script.effect)
|
||||
local derive = require(script.derive)
|
||||
local cleanup = require(script.cleanup)
|
||||
local untrack = require(script.untrack)
|
||||
local read = require(script.read)
|
||||
local batch = require(script.batch)
|
||||
local context = require(script.context)
|
||||
local switch = require(script.switch)
|
||||
local show = require(script.show)
|
||||
local indexes, values = require(script.maps)()
|
||||
local spring, update_springs = require(script.spring)()
|
||||
local action = require(script.action)()
|
||||
local changed = require(script.changed)
|
||||
local throw = require(script.throw)
|
||||
local flags = require(script.flags)
|
||||
local root = require "./root"
|
||||
local mount = require "./mount"
|
||||
local create = require "./create"
|
||||
local apply = require "./apply"
|
||||
local source = require "./source"
|
||||
local effect = require "./effect"
|
||||
local derive = require "./derive"
|
||||
local cleanup = require "./cleanup"
|
||||
local untrack = require "./untrack"
|
||||
local read = require "./read"
|
||||
local batch = require "./batch"
|
||||
local context = require "./context"
|
||||
local switch = require "./switch"
|
||||
local show = require "./show"
|
||||
local indexes, values = require "./maps"()
|
||||
local spring, update_springs = require "./spring"()
|
||||
local action = require "./action"()
|
||||
local changed = require "./changed"
|
||||
local throw = require "./throw"
|
||||
local flags = require "./flags"
|
||||
|
||||
export type Source<T> = source.Source<T>
|
||||
export type source<T> = Source<T>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local flags = require(script.Parent.flags)
|
||||
local graph = require(script.Parent.graph)
|
||||
local throw = require "./throw"
|
||||
local flags = require "./flags"
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
type SourceNode<T> = graph.SourceNode<T>
|
||||
local create_node = graph.create_node
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local root = require(script.Parent.root)
|
||||
local apply = require(script.Parent.apply)
|
||||
local root = require "./root"
|
||||
local apply = require "./apply"
|
||||
|
||||
local function mount<T>(component: () -> T, target: Instance?): () -> ()
|
||||
return root(function()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local function read<T>(value: T | () -> T): T
|
||||
return if type(value) == "function" then value() else value
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local graph = require(script.Parent.graph)
|
||||
local throw = require "./throw"
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
local create_node = graph.create_node
|
||||
local push_scope = graph.push_scope
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local switch = require(script.Parent.switch)
|
||||
local switch = require "./switch"
|
||||
|
||||
local function show<T>(source: () -> any, component: () -> T, fallback: (() -> T)?): () -> T?
|
||||
local function truthy()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
local create_source_node = graph.create_source_node
|
||||
local push_child_to_scope = graph.push_child_to_scope
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
local Vector3 = game and Vector3 or require "test/mock".Vector3 :: never
|
||||
local Vector3 = game and Vector3 or require "../test/mock".Vector3 :: never
|
||||
|
||||
--[[
|
||||
|
||||
|
|
@ -21,8 +20,8 @@ Unsupported datatypes:
|
|||
|
||||
]]
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local graph = require(script.Parent.graph)
|
||||
local throw = require "./throw"
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
type SourceNode<T> = graph.SourceNode<T>
|
||||
local create_node = graph.create_node
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local graph = require(script.Parent.graph)
|
||||
local throw = require "./throw"
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
type SourceNode<T> = graph.SourceNode<T>
|
||||
local create_node = graph.create_node
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local function VIDE_ASSERT(msg): any
|
||||
error(msg, 0)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
if not game then script = require "test/relative-string" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local graph = require "./graph"
|
||||
type Node<T> = graph.Node<T>
|
||||
local get_scope = graph.get_scope
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue