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,5 +1,5 @@
|
||||
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";
|
||||
|
||||
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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { mount, patch, createBlock } from "../../src/blockdom";
|
||||
import { mount, patch, createBlock } from "../../src/runtime/blockdom";
|
||||
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 { 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 { makeTestFixture } from "./helpers";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { comment, mount } from "../../src/blockdom";
|
||||
import { comment, mount } from "../../src/runtime/blockdom";
|
||||
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 { mainEventHandler } from "../../src/component/handler";
|
||||
import { mainEventHandler } from "../../src/runtime/handler";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createBlock, mount } from "../../src/blockdom";
|
||||
import { createBlock, mount } from "../../src/runtime/blockdom";
|
||||
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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -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";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { mount, patch } from "../../src/blockdom";
|
||||
import { mount, patch } from "../../src/runtime/blockdom";
|
||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TemplateSet } from "../../src/app/template_set";
|
||||
import { mount } from "../../src/blockdom";
|
||||
import { TemplateSet } from "../../src/runtime/template_set";
|
||||
import { mount } from "../../src/runtime/blockdom";
|
||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||
import { markup } from "../../src/utils";
|
||||
import { STATUS } from "../../src/component/status";
|
||||
import { markup } from "../../src/runtime/utils";
|
||||
import { STATUS } from "../../src/runtime/status";
|
||||
|
||||
snapshotEverything();
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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";
|
||||
|
||||
// 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 {
|
||||
makeTestFixture,
|
||||
renderToBdom,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
TestContext,
|
||||
makeTestFixture,
|
||||
} from "../helpers";
|
||||
import { mount, patch } from "../../src/blockdom";
|
||||
import { mount, patch } from "../../src/runtime/blockdom";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// import { mountBlock } from "../../src/blockdom/block";
|
||||
import { mount } from "../../src/blockdom";
|
||||
import { mount } from "../../src/runtime/blockdom";
|
||||
import { makeTestFixture, renderToBdom, renderToString, snapshotEverything } from "../helpers";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { renderToString, renderToBdom, snapshotEverything, makeTestFixture } from "../helpers";
|
||||
import { mount, patch } from "../../src/blockdom/index";
|
||||
import { mount, patch } from "../../src/runtime/blockdom/index";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import {
|
||||
TestContext,
|
||||
makeTestFixture,
|
||||
} from "../helpers";
|
||||
import { mount, patch } from "../../src/blockdom";
|
||||
import { createBlock } from "../../src/blockdom/index";
|
||||
import { markup } from "../../src/utils";
|
||||
import { mount, patch } from "../../src/runtime/blockdom";
|
||||
import { createBlock } from "../../src/runtime/blockdom/index";
|
||||
import { markup } from "../../src/runtime/utils";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TemplateSet } from "../../src/app/template_set";
|
||||
import { mount } from "../../src/blockdom";
|
||||
import { TemplateSet } from "../../src/runtime/template_set";
|
||||
import { mount } from "../../src/runtime/blockdom";
|
||||
import { renderToBdom, snapshotEverything } from "../helpers";
|
||||
|
||||
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";
|
||||
|
||||
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";
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { App, Component, mount, status, toRaw, useState, xml } from "../../src";
|
||||
import { elem, makeTestFixture, nextTick, snapshotEverything, useLogLifecycle } from "../helpers";
|
||||
import { markup } from "../../src/utils";
|
||||
import { markup } from "../../src/runtime/utils";
|
||||
|
||||
let fixture: HTMLElement;
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ import {
|
||||
useState,
|
||||
xml,
|
||||
} from "../../src";
|
||||
import { Fiber } from "../../src/component/fibers";
|
||||
import { Scheduler } from "../../src/component/scheduler";
|
||||
import { status } from "../../src/component/status";
|
||||
import { Fiber } from "../../src/runtime/fibers";
|
||||
import { Scheduler } from "../../src/runtime/scheduler";
|
||||
import { status } from "../../src/runtime/status";
|
||||
import {
|
||||
makeDeferred,
|
||||
makeTestFixture,
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
onWillRender,
|
||||
onWillDestroy,
|
||||
onRendered,
|
||||
} from "../../src/component/lifecycle_hooks";
|
||||
import { status } from "../../src/component/status";
|
||||
} from "../../src/runtime/lifecycle_hooks";
|
||||
import { status } from "../../src/runtime/status";
|
||||
import {
|
||||
elem,
|
||||
logStep,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||
import { Component, onError, xml, mount } from "../../src";
|
||||
import { DEV_MSG } from "../../src/app/app";
|
||||
import { validateProps } from "../../src/app/template_helpers";
|
||||
import { Schema } from "../../src/validation";
|
||||
import { DEV_MSG } from "../../src/runtime/app";
|
||||
import { validateProps } from "../../src/runtime/template_helpers";
|
||||
import { Schema } from "../../src/runtime/validation";
|
||||
|
||||
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 { 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 { editInput, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, mount, onMounted, useState, xml } from "../../src/index";
|
||||
import { elem, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||
import { status } from "../../src/component/status";
|
||||
import { status } from "../../src/runtime/status";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@ import {
|
||||
useComponent,
|
||||
xml,
|
||||
} from "../src";
|
||||
import { helpers } from "../src/app/template_helpers";
|
||||
import { TemplateSet, globalTemplates } from "../src/app/template_set";
|
||||
import { BDom } from "../src/blockdom";
|
||||
import { helpers } from "../src/runtime/template_helpers";
|
||||
import { TemplateSet, globalTemplates } from "../src/runtime/template_set";
|
||||
import { BDom } from "../src/runtime/blockdom";
|
||||
import { compile } from "../src/compiler";
|
||||
|
||||
const mount = blockDom.mount;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
useState,
|
||||
} 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";
|
||||
|
||||
let fixture: HTMLElement;
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
markRaw,
|
||||
toRaw,
|
||||
} from "../src";
|
||||
import { reactive, Reactive } from "../src/reactivity";
|
||||
import { batched } from "../src/utils";
|
||||
import { reactive, Reactive } from "../src/runtime/reactivity";
|
||||
import { batched } from "../src/runtime/utils";
|
||||
import {
|
||||
makeDeferred,
|
||||
makeTestFixture,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { batched, EventBus } from "../src/utils";
|
||||
import { batched, EventBus } from "../src/runtime/utils";
|
||||
import { nextMicroTick } from "./helpers";
|
||||
|
||||
describe("event bus behaviour", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Schema, validateSchema } from "../src/validation";
|
||||
import { Schema, validateSchema } from "../src/runtime/validation";
|
||||
|
||||
describe("validateSchema", () => {
|
||||
test("simple use", () => {
|
||||
|
||||
Reference in New Issue
Block a user