mirror of
https://github.com/He4eT/cheap-glkote.git
synced 2026-05-05 00:47:28 +00:00
Move player.stdio
This commit is contained in:
parent
1a9bf1ad0d
commit
b9e4269aa4
4 changed files with 6 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ const fs = require('fs')
|
||||||
const minimist = require('minimist')
|
const minimist = require('minimist')
|
||||||
|
|
||||||
const CheapGlkOte = require('../src/')
|
const CheapGlkOte = require('../src/')
|
||||||
const { handlers } = require('../src/stdio')
|
const { handlers } = require('./stdio')
|
||||||
|
|
||||||
const formats = [
|
const formats = [
|
||||||
{
|
{
|
||||||
|
|
@ -46,8 +46,8 @@ const format = formats.find(x =>
|
||||||
x.extensions.test(storyfile))
|
x.extensions.test(storyfile))
|
||||||
|
|
||||||
if (!format) {
|
if (!format) {
|
||||||
console.error('Unknown storyfile format')
|
console.error('Unknown storyfile format.')
|
||||||
return
|
process.exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { glkInterface, sendFn } = CheapGlkOte(handlers)
|
const { glkInterface, sendFn } = CheapGlkOte(handlers)
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
"interactive-fiction"
|
"interactive-fiction"
|
||||||
],
|
],
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
|
"bin": "bin/player.stdio.js",
|
||||||
"repository": "https://github.com/He4eT/cheap-glkote",
|
"repository": "https://github.com/He4eT/cheap-glkote",
|
||||||
"bugs": "https://github.com/He4eT/cheap-glkote/issues",
|
"bugs": "https://github.com/He4eT/cheap-glkote/issues",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
|
|
@ -21,7 +22,7 @@
|
||||||
"mute-stream": "0.0.8"
|
"mute-stream": "0.0.8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"play": "node ./tests/player.stdio.js",
|
"play": "node ./bin/player.stdio.js",
|
||||||
"test": "./tests/runtests.sh"
|
"test": "./tests/runtests.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
node player.stdio.js praxix.z5 < <(sleep 1 && echo 'all')
|
node ../bin/player.stdio.js praxix.z5 < <(sleep 1 && echo 'all')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue