« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
m---------tui-lib0
-rw-r--r--ui.js36
2 files changed, 22 insertions, 14 deletions
diff --git a/tui-lib b/tui-lib
-Subproject e47a3546f0f9244bb6ee3aa708e7e24226fbdad
+Subproject d8331b98aad2e29b23e88901049fc3c91489a2c
diff --git a/ui.js b/ui.js
index fb1ec02..dfb75ae 100644
--- a/ui.js
+++ b/ui.js
@@ -5,21 +5,29 @@ const { parentSymbol, isGroup, isTrack, getItemPath, getItemPathString, flattenG
 const { shuffleArray } = require('./general-util')
 const processSmartPlaylist = require('./smart-playlist')
 const UndoManager = require('./undo-manager')
-
-const ansi = require('./tui-lib/util/ansi')
-const Button = require('./tui-lib/ui/form/Button')
-const Dialog = require('./tui-lib/ui/Dialog')
-const DisplayElement = require('./tui-lib/ui/DisplayElement')
-const FocusElement = require('./tui-lib/ui/form/FocusElement')
-const Form = require('./tui-lib/ui/form/Form')
-const Label = require('./tui-lib/ui/Label')
-const ListScrollForm = require('./tui-lib/ui/form/ListScrollForm')
-const Pane = require('./tui-lib/ui/Pane')
 const RecordStore = require('./record-store')
-const TextInput = require('./tui-lib/ui/form/TextInput')
-const WrapLabel = require('./tui-lib/ui/WrapLabel')
-const telc = require('./tui-lib/util/telchars')
-const unic = require('./tui-lib/util/unichars')
+
+const {
+  ui: {
+    Dialog,
+    DisplayElement,
+    Label,
+    Pane,
+    WrapLabel,
+    form: {
+      Button,
+      FocusElement,
+      Form,
+      ListScrollForm,
+      TextInput,
+    }
+  },
+  util: {
+    ansi,
+    telchars: telc,
+    unichars: unic,
+  }
+} = require('./tui-lib')
 
 const fs = require('fs')
 const { promisify } = require('util')