Move player.stdio

This commit is contained in:
He4eT 2021-02-24 17:56:55 +05:00
commit b9e4269aa4
4 changed files with 6 additions and 5 deletions

View file

@ -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)

View file

@ -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"
} }
} }

View file

@ -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')