mirror of
https://github.com/He4eT/cheap-glkote.git
synced 2026-05-05 00:47:28 +00:00
Add links to original files
This commit is contained in:
parent
f903b78745
commit
a9842cd696
6 changed files with 27 additions and 17 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-term.js
|
||||
*/
|
||||
|
||||
class GlkOte {
|
||||
constructor() {
|
||||
this.current_metrics = null
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue