mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] reorganize file structure
in order to separate compiler/ and runtime/ code
This commit is contained in:
committed by
Sam Degueldre
parent
e4b810c027
commit
22a79cdedd
+1
-1
@@ -21,7 +21,7 @@ switch (process.argv[4]) {
|
|||||||
]
|
]
|
||||||
break;
|
break;
|
||||||
case "runtime":
|
case "runtime":
|
||||||
input = "src/index.runtime.ts";
|
input = "src/runtime/index.ts";
|
||||||
output = [
|
output = [
|
||||||
getConfigForFormat('esm', addSuffix(pkg.module, 'runtime'), outro),
|
getConfigForFormat('esm', addSuffix(pkg.module, 'runtime'), outro),
|
||||||
getConfigForFormat('cjs', addSuffix(pkg.main, 'runtime'), outro),
|
getConfigForFormat('cjs', addSuffix(pkg.main, 'runtime'), outro),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { TemplateSet } from "../app/template_set";
|
import type { TemplateSet } from "../runtime/template_set";
|
||||||
import type { BDom } from "../blockdom";
|
import type { BDom } from "../runtime/blockdom";
|
||||||
import { CodeGenerator, Config } from "./code_generator";
|
import { CodeGenerator, Config } from "./code_generator";
|
||||||
import { parse } from "./parser";
|
import { parse } from "./parser";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { TemplateSet } from "./app/template_set";
|
import { TemplateSet } from "./runtime/template_set";
|
||||||
import { compile } from "./compiler";
|
import { compile } from "./compiler";
|
||||||
|
|
||||||
export * from "./index.runtime";
|
export * from "./runtime";
|
||||||
|
|
||||||
TemplateSet.prototype._compileTemplate = function _compileTemplate(
|
TemplateSet.prototype._compileTemplate = function _compileTemplate(
|
||||||
name: string,
|
name: string,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Component, ComponentConstructor } from "../component/component";
|
import { Component, ComponentConstructor } from "./component";
|
||||||
import { ComponentNode } from "../component/component_node";
|
import { ComponentNode } from "./component_node";
|
||||||
import { MountOptions } from "../component/fibers";
|
import { MountOptions } from "./fibers";
|
||||||
import { Scheduler } from "../component/scheduler";
|
import { Scheduler } from "./scheduler";
|
||||||
import { TemplateSet, TemplateSetConfig } from "./template_set";
|
import { TemplateSet, TemplateSetConfig } from "./template_set";
|
||||||
import { nodeErrorHandlers } from "../component/error_handling";
|
import { nodeErrorHandlers } from "./error_handling";
|
||||||
import { validateTarget } from "../utils";
|
import { validateTarget } from "./utils";
|
||||||
import { validateProps } from "./template_helpers";
|
import { validateProps } from "./template_helpers";
|
||||||
|
|
||||||
// reimplement dev mode stuff see last change in 0f7a8289a6fb8387c3c1af41c6664b2a8448758f
|
// reimplement dev mode stuff see last change in 0f7a8289a6fb8387c3c1af41c6664b2a8448758f
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Schema } from "../validation";
|
import { Schema } from "./validation";
|
||||||
import type { ComponentNode } from "./component_node";
|
import type { ComponentNode } from "./component_node";
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { App, Env } from "../app/app";
|
import type { App, Env } from "./app";
|
||||||
import { BDom, VNode } from "../blockdom";
|
import { BDom, VNode } from "./blockdom";
|
||||||
import {
|
import {
|
||||||
clearReactivesForCallback,
|
clearReactivesForCallback,
|
||||||
getSubscriptions,
|
getSubscriptions,
|
||||||
@@ -8,8 +8,8 @@ import {
|
|||||||
reactive,
|
reactive,
|
||||||
toRaw,
|
toRaw,
|
||||||
TARGET,
|
TARGET,
|
||||||
} from "../reactivity";
|
} from "./reactivity";
|
||||||
import { batched, Callback } from "../utils";
|
import { batched, Callback } from "./utils";
|
||||||
import { Component, ComponentConstructor } from "./component";
|
import { Component, ComponentConstructor } from "./component";
|
||||||
import { fibersInError, handleError } from "./error_handling";
|
import { fibersInError, handleError } from "./error_handling";
|
||||||
import { Fiber, makeChildFiber, makeRootFiber, MountFiber, MountOptions } from "./fibers";
|
import { Fiber, makeChildFiber, makeRootFiber, MountFiber, MountOptions } from "./fibers";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BDom, mount } from "../blockdom";
|
import { BDom, mount } from "./blockdom";
|
||||||
import type { ComponentNode } from "./component_node";
|
import type { ComponentNode } from "./component_node";
|
||||||
import { fibersInError, handleError } from "./error_handling";
|
import { fibersInError, handleError } from "./error_handling";
|
||||||
import { STATUS } from "./status";
|
import { STATUS } from "./status";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { filterOutModifiersFromData } from "../blockdom/config";
|
import { filterOutModifiersFromData } from "./blockdom/config";
|
||||||
import { STATUS } from "./status";
|
import { STATUS } from "./status";
|
||||||
|
|
||||||
export const mainEventHandler = (data: any, ev: Event, currentTarget?: EventTarget | null) => {
|
export const mainEventHandler = (data: any, ev: Event, currentTarget?: EventTarget | null) => {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Env } from "./app/app";
|
import type { Env } from "./app";
|
||||||
import { getCurrent } from "./component/component_node";
|
import { getCurrent } from "./component_node";
|
||||||
import { onMounted, onPatched, onWillUnmount } from "./component/lifecycle_hooks";
|
import { onMounted, onPatched, onWillUnmount } from "./lifecycle_hooks";
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// useRef
|
// useRef
|
||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
toggler,
|
toggler,
|
||||||
comment,
|
comment,
|
||||||
} from "./blockdom";
|
} from "./blockdom";
|
||||||
import { mainEventHandler } from "./component/handler";
|
import { mainEventHandler } from "./handler";
|
||||||
export type { Reactive } from "./reactivity";
|
export type { Reactive } from "./reactivity";
|
||||||
|
|
||||||
config.shouldNormalizeDom = false;
|
config.shouldNormalizeDom = false;
|
||||||
@@ -33,11 +33,11 @@ export const blockDom = {
|
|||||||
comment,
|
comment,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { App, mount } from "./app/app";
|
export { App, mount } from "./app";
|
||||||
export { xml } from "./app/template_set";
|
export { xml } from "./template_set";
|
||||||
export { Component } from "./component/component";
|
export { Component } from "./component";
|
||||||
export { useComponent, useState } from "./component/component_node";
|
export { useComponent, useState } from "./component_node";
|
||||||
export { status } from "./component/status";
|
export { status } from "./status";
|
||||||
export { reactive, markRaw, toRaw } from "./reactivity";
|
export { reactive, markRaw, toRaw } from "./reactivity";
|
||||||
export { useEffect, useEnv, useExternalListener, useRef, useChildSubEnv, useSubEnv } from "./hooks";
|
export { useEffect, useEnv, useExternalListener, useRef, useChildSubEnv, useSubEnv } from "./hooks";
|
||||||
export { EventBus, whenReady, loadFile, markup } from "./utils";
|
export { EventBus, whenReady, loadFile, markup } from "./utils";
|
||||||
@@ -52,7 +52,7 @@ export {
|
|||||||
onRendered,
|
onRendered,
|
||||||
onWillDestroy,
|
onWillDestroy,
|
||||||
onError,
|
onError,
|
||||||
} from "./component/lifecycle_hooks";
|
} from "./lifecycle_hooks";
|
||||||
export { validate } from "./validation";
|
export { validate } from "./validation";
|
||||||
|
|
||||||
export const __info__ = {};
|
export const __info__ = {};
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { onWillUnmount } from "./component/lifecycle_hooks";
|
import { onWillUnmount } from "./lifecycle_hooks";
|
||||||
import { BDom, text, VNode } from "./blockdom";
|
import { BDom, text, VNode } from "./blockdom";
|
||||||
import { Component } from "./component/component";
|
import { Component } from "./component";
|
||||||
|
|
||||||
const VText: any = text("").constructor;
|
const VText: any = text("").constructor;
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { BDom, multi, text, toggler, createCatcher } from "../blockdom";
|
import { BDom, multi, text, toggler, createCatcher } from "./blockdom";
|
||||||
import { Markup } from "../utils";
|
import { Markup } from "./utils";
|
||||||
import { html } from "../blockdom/index";
|
import { html } from "./blockdom/index";
|
||||||
import { isOptional, validateSchema } from "../validation";
|
import { isOptional, validateSchema } from "./validation";
|
||||||
import type { ComponentConstructor } from "../component/component";
|
import type { ComponentConstructor } from "./component";
|
||||||
import { markRaw } from "../reactivity";
|
import { markRaw } from "./reactivity";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file contains utility functions that will be injected in each template,
|
* This file contains utility functions that will be injected in each template,
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { createBlock, html, list, multi, text, toggler, comment } from "../blockdom";
|
import { createBlock, html, list, multi, text, toggler, comment } from "./blockdom";
|
||||||
import { compile, Template, TemplateFunction } from "../compiler";
|
import { compile, Template, TemplateFunction } from "../compiler";
|
||||||
import { Portal, portalTemplate } from "../portal";
|
import { Portal, portalTemplate } from "./portal";
|
||||||
import { component, getCurrent } from "../component/component_node";
|
import { component, getCurrent } from "./component_node";
|
||||||
import { helpers } from "./template_helpers";
|
import { helpers } from "./template_helpers";
|
||||||
|
|
||||||
const bdom = { text, createBlock, list, multi, html, toggler, component, comment };
|
const bdom = { text, createBlock, list, multi, html, toggler, component, comment };
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { App, Component, mount, xml } from "../../src";
|
import { App, Component, mount, xml } from "../../src";
|
||||||
import { status } from "../../src/component/status";
|
import { status } from "../../src/runtime/status";
|
||||||
import { makeTestFixture, snapshotEverything, nextTick, elem } from "../helpers";
|
import { makeTestFixture, snapshotEverything, nextTick, elem } from "../helpers";
|
||||||
|
|
||||||
let fixture: HTMLElement;
|
let fixture: HTMLElement;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createBlock, mount, patch, remove, text } from "../../src/blockdom";
|
import { createBlock, mount, patch, remove, text } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount, patch, createBlock } from "../../src/blockdom";
|
import { mount, patch, createBlock } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount, createBlock, multi, config, patch } from "../../src/blockdom";
|
import { mount, createBlock, multi, config, patch } from "../../src/runtime/blockdom";
|
||||||
// import { defaultHandler, setupMainHandler } from "../../src/bdom/block";
|
// import { defaultHandler, setupMainHandler } from "../../src/bdom/block";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createBlock, mount, patch, remove } from "../../src/blockdom";
|
import { createBlock, mount, patch, remove } from "../../src/runtime/blockdom";
|
||||||
import { logStep } from "../helpers";
|
import { logStep } from "../helpers";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { comment, mount } from "../../src/blockdom";
|
import { comment, mount } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { config, createBlock, createCatcher, mount } from "../../src/blockdom";
|
import { config, createBlock, createCatcher, mount } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
import { mainEventHandler } from "../../src/component/handler";
|
import { mainEventHandler } from "../../src/runtime/handler";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Setup and helpers
|
// Setup and helpers
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { html, mount, patch, text } from "../../src/blockdom";
|
import { html, mount, patch, text } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
import { list, mount, multi, patch, text, createBlock, VNode, withKey } from "../../src/blockdom";
|
import {
|
||||||
|
list,
|
||||||
|
mount,
|
||||||
|
multi,
|
||||||
|
patch,
|
||||||
|
text,
|
||||||
|
createBlock,
|
||||||
|
VNode,
|
||||||
|
withKey,
|
||||||
|
} from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount, multi, patch, text, createBlock } from "../../src/blockdom";
|
import { mount, multi, patch, text, createBlock } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createBlock, mount } from "../../src/blockdom";
|
import { createBlock, mount } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createBlock, mount, multi, patch } from "../../src/blockdom";
|
import { createBlock, mount, multi, patch } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount, patch, remove, text } from "../../src/blockdom";
|
import { mount, patch, remove, text } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createBlock, mount, patch, text, toggler } from "../../src/blockdom";
|
import { createBlock, mount, patch, text, toggler } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture } from "./helpers";
|
import { makeTestFixture } from "./helpers";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount, patch } from "../../src/blockdom";
|
import { mount, patch } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { TemplateSet } from "../../src/app/template_set";
|
import { TemplateSet } from "../../src/runtime/template_set";
|
||||||
import { mount } from "../../src/blockdom";
|
import { mount } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||||
import { markup } from "../../src/utils";
|
import { markup } from "../../src/runtime/utils";
|
||||||
import { STATUS } from "../../src/component/status";
|
import { STATUS } from "../../src/runtime/status";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { renderToString, renderToBdom, snapshotEverything, makeTestFixture } from "../helpers";
|
import { renderToString, renderToBdom, snapshotEverything, makeTestFixture } from "../helpers";
|
||||||
import { mount } from "../../src/blockdom";
|
import { mount } from "../../src/runtime/blockdom";
|
||||||
import { mount as mountComponent, Component, xml } from "../../src/index";
|
import { mount as mountComponent, Component, xml } from "../../src/index";
|
||||||
|
|
||||||
// NB: check the snapshots to see where the SVG namespaces are added
|
// NB: check the snapshots to see where the SVG namespaces are added
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount } from "../../src/blockdom";
|
import { mount } from "../../src/runtime/blockdom";
|
||||||
import {
|
import {
|
||||||
makeTestFixture,
|
makeTestFixture,
|
||||||
renderToBdom,
|
renderToBdom,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
TestContext,
|
TestContext,
|
||||||
makeTestFixture,
|
makeTestFixture,
|
||||||
} from "../helpers";
|
} from "../helpers";
|
||||||
import { mount, patch } from "../../src/blockdom";
|
import { mount, patch } from "../../src/runtime/blockdom";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// import { mountBlock } from "../../src/blockdom/block";
|
// import { mountBlock } from "../../src/blockdom/block";
|
||||||
import { mount } from "../../src/blockdom";
|
import { mount } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { renderToString, renderToBdom, snapshotEverything, makeTestFixture } from "../helpers";
|
import { renderToString, renderToBdom, snapshotEverything, makeTestFixture } from "../helpers";
|
||||||
import { mount, patch } from "../../src/blockdom/index";
|
import { mount, patch } from "../../src/runtime/blockdom/index";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import {
|
|||||||
TestContext,
|
TestContext,
|
||||||
makeTestFixture,
|
makeTestFixture,
|
||||||
} from "../helpers";
|
} from "../helpers";
|
||||||
import { mount, patch } from "../../src/blockdom";
|
import { mount, patch } from "../../src/runtime/blockdom";
|
||||||
import { createBlock } from "../../src/blockdom/index";
|
import { createBlock } from "../../src/runtime/blockdom/index";
|
||||||
import { markup } from "../../src/utils";
|
import { markup } from "../../src/runtime/utils";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { TemplateSet } from "../../src/app/template_set";
|
import { TemplateSet } from "../../src/runtime/template_set";
|
||||||
import { mount } from "../../src/blockdom";
|
import { mount } from "../../src/runtime/blockdom";
|
||||||
import { renderToBdom, snapshotEverything } from "../helpers";
|
import { renderToBdom, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { mount, patch } from "../../src/blockdom";
|
import { mount, patch } from "../../src/runtime/blockdom";
|
||||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { TemplateSet } from "../../src/app/template_set";
|
import { TemplateSet } from "../../src/runtime/template_set";
|
||||||
import { renderToString, snapshotTemplate, TestContext } from "../helpers";
|
import { renderToString, snapshotTemplate, TestContext } from "../helpers";
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { App, Component, mount, status, toRaw, useState, xml } from "../../src";
|
import { App, Component, mount, status, toRaw, useState, xml } from "../../src";
|
||||||
import { elem, makeTestFixture, nextTick, snapshotEverything, useLogLifecycle } from "../helpers";
|
import { elem, makeTestFixture, nextTick, snapshotEverything, useLogLifecycle } from "../helpers";
|
||||||
import { markup } from "../../src/utils";
|
import { markup } from "../../src/runtime/utils";
|
||||||
|
|
||||||
let fixture: HTMLElement;
|
let fixture: HTMLElement;
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
xml,
|
xml,
|
||||||
} from "../../src";
|
} from "../../src";
|
||||||
import { Fiber } from "../../src/component/fibers";
|
import { Fiber } from "../../src/runtime/fibers";
|
||||||
import { Scheduler } from "../../src/component/scheduler";
|
import { Scheduler } from "../../src/runtime/scheduler";
|
||||||
import { status } from "../../src/component/status";
|
import { status } from "../../src/runtime/status";
|
||||||
import {
|
import {
|
||||||
makeDeferred,
|
makeDeferred,
|
||||||
makeTestFixture,
|
makeTestFixture,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import {
|
|||||||
onWillRender,
|
onWillRender,
|
||||||
onWillDestroy,
|
onWillDestroy,
|
||||||
onRendered,
|
onRendered,
|
||||||
} from "../../src/component/lifecycle_hooks";
|
} from "../../src/runtime/lifecycle_hooks";
|
||||||
import { status } from "../../src/component/status";
|
import { status } from "../../src/runtime/status";
|
||||||
import {
|
import {
|
||||||
elem,
|
elem,
|
||||||
logStep,
|
logStep,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
import { makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||||
import { Component, onError, xml, mount } from "../../src";
|
import { Component, onError, xml, mount } from "../../src";
|
||||||
import { DEV_MSG } from "../../src/app/app";
|
import { DEV_MSG } from "../../src/runtime/app";
|
||||||
import { validateProps } from "../../src/app/template_helpers";
|
import { validateProps } from "../../src/runtime/template_helpers";
|
||||||
import { Schema } from "../../src/validation";
|
import { Schema } from "../../src/runtime/validation";
|
||||||
|
|
||||||
let fixture: HTMLElement;
|
let fixture: HTMLElement;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { text } from "../../src/blockdom";
|
import { text } from "../../src/runtime/blockdom";
|
||||||
import { Component, mount, xml } from "../../src/index";
|
import { Component, mount, xml } from "../../src/index";
|
||||||
import { makeTestFixture, snapshotEverything } from "../helpers";
|
import { makeTestFixture, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component } from "../../src/component/component";
|
import { Component } from "../../src/runtime/component";
|
||||||
import { mount, useState, xml } from "../../src/index";
|
import { mount, useState, xml } from "../../src/index";
|
||||||
import { editInput, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
import { editInput, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, mount, onMounted, useState, xml } from "../../src/index";
|
import { Component, mount, onMounted, useState, xml } from "../../src/index";
|
||||||
import { elem, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
import { elem, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||||
import { status } from "../../src/component/status";
|
import { status } from "../../src/runtime/status";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -15,9 +15,9 @@ import {
|
|||||||
useComponent,
|
useComponent,
|
||||||
xml,
|
xml,
|
||||||
} from "../src";
|
} from "../src";
|
||||||
import { helpers } from "../src/app/template_helpers";
|
import { helpers } from "../src/runtime/template_helpers";
|
||||||
import { TemplateSet, globalTemplates } from "../src/app/template_set";
|
import { TemplateSet, globalTemplates } from "../src/runtime/template_set";
|
||||||
import { BDom } from "../src/blockdom";
|
import { BDom } from "../src/runtime/blockdom";
|
||||||
import { compile } from "../src/compiler";
|
import { compile } from "../src/compiler";
|
||||||
|
|
||||||
const mount = blockDom.mount;
|
const mount = blockDom.mount;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
} from "../../src";
|
} from "../../src";
|
||||||
import { xml } from "../../src/";
|
import { xml } from "../../src/";
|
||||||
import { DEV_MSG } from "../../src/app/app";
|
import { DEV_MSG } from "../../src/runtime/app";
|
||||||
import { elem, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
import { elem, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
let fixture: HTMLElement;
|
let fixture: HTMLElement;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
markRaw,
|
markRaw,
|
||||||
toRaw,
|
toRaw,
|
||||||
} from "../src";
|
} from "../src";
|
||||||
import { reactive, Reactive } from "../src/reactivity";
|
import { reactive, Reactive } from "../src/runtime/reactivity";
|
||||||
import { batched } from "../src/utils";
|
import { batched } from "../src/runtime/utils";
|
||||||
import {
|
import {
|
||||||
makeDeferred,
|
makeDeferred,
|
||||||
makeTestFixture,
|
makeTestFixture,
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { batched, EventBus } from "../src/utils";
|
import { batched, EventBus } from "../src/runtime/utils";
|
||||||
import { nextMicroTick } from "./helpers";
|
import { nextMicroTick } from "./helpers";
|
||||||
|
|
||||||
describe("event bus behaviour", () => {
|
describe("event bus behaviour", () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Schema, validateSchema } from "../src/validation";
|
import { Schema, validateSchema } from "../src/runtime/validation";
|
||||||
|
|
||||||
describe("validateSchema", () => {
|
describe("validateSchema", () => {
|
||||||
test("simple use", () => {
|
test("simple use", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user