From f570f7aee3ca93fd382279eb3a0c0823d2b508db Mon Sep 17 00:00:00 2001 From: Aaron Ault Date: Sat, 23 Mar 2024 09:47:21 -0400 Subject: [PATCH] Moved trellis tree to convert, exported formats and trees from index --- app/src/App.tsx | 9 ++++----- convert/src/index.ts | 3 ++- app/src/trellisTree.ts => convert/src/tree.ts | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename app/src/trellisTree.ts => convert/src/tree.ts (100%) diff --git a/app/src/App.tsx b/app/src/App.tsx index e1a9f30..214d3b2 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -4,12 +4,11 @@ import debug from 'debug'; import md5 from 'md5'; import './App.css'; import { connect } from '@oada/client'; -import { tree } from './trellisTree'; import { observer } from 'mobx-react-lite'; import { context } from './state'; import { toModus2QuickHack } from './toModus2' // @ts-ignore -import { file as convertFile, units, ModusResult } from '@modusjs/convert/dist-browser/bundle.mjs'; +import { file as convertFile, tree, units, ModusResult } from '@modusjs/convert/dist-browser/bundle.mjs'; import type { json } from '@modusjs/convert'; import Messages from './Messages'; @@ -23,7 +22,7 @@ const error = debug('@modusjs/app#App:error'); const warn = debug('@modusjs/app#App:warn'); export default observer(function App() { - const { state, actions } = useContext(context); + const { state, actions } = useContext(context); async function toTrellis ({ domain, token, results } : { domain: string, token: string, results: ModusResult[] }): Promise { @@ -166,7 +165,7 @@ export default observer(function App() {   } - +
@@ -250,4 +249,4 @@ function serializeJSON(obj: any): string { return acc; },"") + endtoken; -} +} \ No newline at end of file diff --git a/convert/src/index.ts b/convert/src/index.ts index 813ca11..b9c15b0 100644 --- a/convert/src/index.ts +++ b/convert/src/index.ts @@ -4,6 +4,7 @@ export * as json from './json.js'; export * as units from './units.js'; // Promote type to top-level export export { ModusResult, InputFile } from './json.js'; +export { tree } from './tree.js'; // trellis tree // exported from the platform-specific code node/ and browser/ -//export * as html from './html.js'; +//export * as html from './html.js'; \ No newline at end of file diff --git a/app/src/trellisTree.ts b/convert/src/tree.ts similarity index 100% rename from app/src/trellisTree.ts rename to convert/src/tree.ts