mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-21 23:00:43 -08:00
do not interprete mjs files from 84 as node-scripts
This commit is contained in:
@@ -14,6 +14,10 @@ const path = require('path');
|
|||||||
const TITLE = 'BASIC Computer Games';
|
const TITLE = 'BASIC Computer Games';
|
||||||
const JAVASCRIPT_FOLDER = 'javascript';
|
const JAVASCRIPT_FOLDER = 'javascript';
|
||||||
const IGNORE_FOLDERS_START_WITH = ['.', '00_', 'buildJvm', 'Sudoku'];
|
const IGNORE_FOLDERS_START_WITH = ['.', '00_', 'buildJvm', 'Sudoku'];
|
||||||
|
const IGNORE_FILES = [
|
||||||
|
// "84 Super Star Trek" has it's own node/js implementation (using xterm)
|
||||||
|
'cli.mjs', 'superstartrek.mjs'
|
||||||
|
];
|
||||||
|
|
||||||
function createGameLinks(game) {
|
function createGameLinks(game) {
|
||||||
const creatFileLink = (file, name = path.basename(file)) => {
|
const creatFileLink = (file, name = path.basename(file)) => {
|
||||||
@@ -98,7 +102,8 @@ function findJSFilesInFolder(folder) {
|
|||||||
const entries = [
|
const entries = [
|
||||||
...htmlFiles,
|
...htmlFiles,
|
||||||
...mjsFiles
|
...mjsFiles
|
||||||
];
|
].filter(file => !IGNORE_FILES.includes(file));
|
||||||
|
console.log(entries);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,9 @@ import {
|
|||||||
onExit,
|
onExit,
|
||||||
onPrint,
|
onPrint,
|
||||||
onInput,
|
onInput,
|
||||||
setGameOptions,
|
|
||||||
getGameState,
|
|
||||||
gameMain,
|
gameMain,
|
||||||
} from "./superstartrek.mjs";
|
} from "./superstartrek.mjs";
|
||||||
|
|
||||||
import util from "util";
|
|
||||||
import readline from "readline";
|
import readline from "readline";
|
||||||
|
|
||||||
onExit(function exit() {
|
onExit(function exit() {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user