diff --git a/packages/okam-core/src/tt/App.js b/packages/okam-core/src/tt/App.js new file mode 100644 index 00000000..5ad8f10c --- /dev/null +++ b/packages/okam-core/src/tt/App.js @@ -0,0 +1,9 @@ +/** + * @file Create toutiao App instance + * @author sparklewhy@gmail.com + */ + +'use strict'; + +import App from '../App'; +export default App; diff --git a/packages/okam-core/src/tt/Component.js b/packages/okam-core/src/tt/Component.js new file mode 100644 index 00000000..2064e391 --- /dev/null +++ b/packages/okam-core/src/tt/Component.js @@ -0,0 +1,28 @@ +/** + * @file Create toutiao component instance + * @author sparklewhy@gmail.com + */ + +'use strict'; + +import {createComponent} from '../helper/factory'; +import {normalizeComponent} from '../helper/component'; +import componentBase from '../base/component'; + +/** + * Create component instance + * + * @param {Object} componentInfo the component information + * @param {Object} refComponents the component reference used in the component, the + * reference information is defined in the template + * @return {Object} + */ +export default function extendComponent(componentInfo, refComponents) { + return createComponent( + componentInfo, + componentBase, + normalizeComponent, + refComponents + ); +} + diff --git a/packages/okam-core/src/tt/Page.js b/packages/okam-core/src/tt/Page.js new file mode 100644 index 00000000..29478484 --- /dev/null +++ b/packages/okam-core/src/tt/Page.js @@ -0,0 +1,9 @@ +/** + * @file Create wx page instance + * @author sparklewhy@gmail.com + */ + +'use strict'; + +import Page from '../Page'; +export default Page;