diff --git a/src/cheapGlkOte.js b/src/cheapGlkOte.js index 446f2fb..7f0270d 100644 --- a/src/cheapGlkOte.js +++ b/src/cheapGlkOte.js @@ -1,3 +1,7 @@ +/** + * @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-dumb.js + */ + const GlkOte = require('./glkOte/glkote-term') class CheapGlkOte extends GlkOte { @@ -33,7 +37,7 @@ class CheapGlkOte extends GlkOte { update_inputs(data) { if (!data.length) return null - const {type} = data[0] + const { type } = data[0] if (['char', 'line'].includes(type)) { this.current_input_type = type this.handlers.onUpdateInputs(type) @@ -58,9 +62,9 @@ class CheapGlkOte extends GlkOte { } update_content(messages) { - const filtered = - messages.filter(content => - content.id === this.window.id)[0] + const filtered = messages.filter( + content => content.id === this.window.id + )[0] this.handlers.onUpdateContent(filtered) } diff --git a/src/fakeDialog.js b/src/fakeDialog.js index b9b5d66..5964e1b 100644 --- a/src/fakeDialog.js +++ b/src/fakeDialog.js @@ -1,3 +1,8 @@ +/** + * @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-dumb.js + * @see: https://github.com/curiousdannii/glkote-term/blob/master/src/electrofs.js + */ + class FakeDialog { constructor(handlers) { this.streaming = false diff --git a/src/glkOte/glkote-term.js b/src/glkOte/glkote-term.js index 147e3cf..4ed68af 100644 --- a/src/glkOte/glkote-term.js +++ b/src/glkOte/glkote-term.js @@ -1,3 +1,7 @@ +/** + * @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-term.js + */ + class GlkOte { constructor() { this.current_metrics = null diff --git a/src/index.js b/src/index.js index 300e9a3..bc18439 100644 --- a/src/index.js +++ b/src/index.js @@ -11,7 +11,7 @@ const noopHandlers = [ 'onFileNameRequest', 'onExit', 'setSend' -].reduce((acc, x) => (acc[x] = noop, acc), {}) +].reduce((acc, x) => ((acc[x] = noop), acc), {}) module.exports = handlers_ => { const handlers = diff --git a/src/stdio.js b/src/stdio.js index d9b40b2..2a730fc 100644 --- a/src/stdio.js +++ b/src/stdio.js @@ -1,3 +1,7 @@ +/** + * @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-dumb.js + */ + const readline = require('readline') const MuteStream = require('mute-stream') const ansiEscapes = require('ansi-escapes') @@ -26,7 +30,7 @@ const onInit = () => { } const onUpdateContent = messages => - messages.text.forEach(({append, content}) => { + messages.text.forEach(({ append, content }) => { if (!append) { stdout.write('\n') } @@ -72,7 +76,7 @@ const onFileNameRequest = (tosave, usage, callback) => { rl.question( 'Please enter a file name (without an extension): ', filename => callback(filename - ? {filename, usage} + ? { filename, usage } : null)) } diff --git a/tests/player.stdio.js b/tests/player.stdio.js index 3f6d375..ec16054 100644 --- a/tests/player.stdio.js +++ b/tests/player.stdio.js @@ -1,15 +1,8 @@ #!/usr/bin/env node -/* - -Emglken runner -============== - -Copyright (c) 2020 Dannii Willis -MIT licenced -https://github.com/curiousdannii/emglken - -*/ +/** + * @see: https://github.com/curiousdannii/emglken/blob/master/bin/emglken.js + */ const fs = require('fs') const minimist = require('minimist')