« get me outta code hell

Import tui-lib with npm instead of as a submodule - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-10-17 12:07:22 -0300
committerFlorrie <towerofnix@gmail.com>2019-10-17 12:07:22 -0300
commitdd1d5c0cb646c2bf9dd189b0e81892a676bf25cb (patch)
treea49e67d42f981b86ad5a47615fd80f5a0b1411d4
parente8dda5c874df324f2aaeaedd6771ae679b6f66c4 (diff)
Import tui-lib with npm instead of as a submodule
-rw-r--r--.gitmodules3
-rw-r--r--README.md6
-rw-r--r--client.js2
-rw-r--r--guess.js2
-rwxr-xr-xindex.js2
-rw-r--r--package-lock.json9
-rw-r--r--package.json2
-rw-r--r--telnet-server.js2
m---------tui-lib0
-rw-r--r--ui.js2
10 files changed, 18 insertions, 12 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 6a82266..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "tui-lib"]
-	path = tui-lib
-	url = https://notabug.org/towerofnix/tui-lib.git
diff --git a/README.md b/README.md
index 784ce6a..de6aa4e 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,7 @@
 You will need a relatively recent version of [Node.js](https://nodejs.org/en/), as well as [mpv](https://mpv.io/) (`apt install mpv` and the like work fine).
 
 ```
-# Please do note --recursive. It clones git submodules.
-git clone --recursive https://git.ed1.club/florrie/mtui.git  # Or https://notabug.org/towerofnix/mtui.git
+git clone https://git.ed1.club/florrie/mtui.git  # Or https://notabug.org/towerofnix/mtui.git
 cd mtui
 npm install
 npm link  # Or sudo npm link
@@ -14,7 +13,8 @@ mtui  # Or node .
 ```
 
 Add music to the `~/Music` folder to make it show up in mtui, or pass `mtui` a
-playlist.json file (usually generated by http-music or downloaded from online).
+playlist.json file (usually generated by http-music or downloaded from online)
+or any directory containing music you'd like to play.
 
 ## Bugs or ideas?
 
diff --git a/client.js b/client.js
index a48ca3f..50e4a7a 100644
--- a/client.js
+++ b/client.js
@@ -14,7 +14,7 @@ const {
     Flushable,
     TelnetInterfacer
   }
-} = require('./tui-lib')
+} = require('tui-lib')
 
 const setupClient = async ({backend, writable, interfacer, appConfig}) => {
   const cleanTerminal = () => {
diff --git a/guess.js b/guess.js
index deceb01..56c614a 100644
--- a/guess.js
+++ b/guess.js
@@ -14,7 +14,7 @@ const {
     ansi,
     telchars: telc
   }
-} = require('./tui-lib')
+} = require('tui-lib')
 
 function untilEvent(object, event) {
   return new Promise(resolve => {
diff --git a/index.js b/index.js
index 26f0fbb..bb0daee 100755
--- a/index.js
+++ b/index.js
@@ -23,7 +23,7 @@ const {
     CommandLineInterfacer,
     Flushable
   }
-} = require('./tui-lib')
+} = require('tui-lib')
 
 const { promisify } = require('util')
 const fs = require('fs')
diff --git a/package-lock.json b/package-lock.json
index afed660..52cb54d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -111,6 +111,15 @@
         "utf8-byte-length": "^1.0.1"
       }
     },
+    "tui-lib": {
+      "version": "0.0.4",
+      "resolved": "https://registry.npmjs.org/tui-lib/-/tui-lib-0.0.4.tgz",
+      "integrity": "sha512-71N5X03B78zqDCwZmAUzAssJcss3DYx9dqfq9ZjJJUNZvK4K/hlrzvVwS0OtxfjFH6yAR9DjU92juyjjusC4+A==",
+      "requires": {
+        "wcwidth": "^1.0.1",
+        "word-wrap": "^1.2.3"
+      }
+    },
     "unique-string": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
diff --git a/package.json b/package.json
index 943a7c4..c7638d8 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
     "open": "^7.0.0",
     "sanitize-filename": "^1.6.1",
     "tempy": "^0.2.1",
-    "wcwidth": "^1.0.1",
+    "tui-lib": "0.0.4",
     "word-wrap": "^1.2.3"
   }
 }
diff --git a/telnet-server.js b/telnet-server.js
index b6db412..33e3dcc 100644
--- a/telnet-server.js
+++ b/telnet-server.js
@@ -8,7 +8,7 @@ const {
   util: {
     TelnetInterfacer
   }
-} = require('./tui-lib')
+} = require('tui-lib')
 
 class TelnetServer extends EventEmitter {
   constructor(backend) {
diff --git a/tui-lib b/tui-lib
deleted file mode 160000
-Subproject c56242c3266d1fdf83eceed532c054fba808463
diff --git a/ui.js b/ui.js
index 24d0881..9a61ec4 100644
--- a/ui.js
+++ b/ui.js
@@ -45,7 +45,7 @@ const {
     telchars: telc,
     unichars: unic,
   }
-} = require('./tui-lib')
+} = require('tui-lib')
 
 const open = require('open')