From e97820ae11a9cea863f1d712eebf89f0bfc0f32f Mon Sep 17 00:00:00 2001 From: Alexander Wunschik Date: Wed, 30 Mar 2022 20:34:41 +0200 Subject: [PATCH] do not interprete mjs files from 84 as node-scripts --- 00_Utilities/build-index.js | 7 ++++++- 84_Super_Star_Trek/javascript/cli.mjs | 3 --- index.html | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/00_Utilities/build-index.js b/00_Utilities/build-index.js index 597ef191..20af363e 100644 --- a/00_Utilities/build-index.js +++ b/00_Utilities/build-index.js @@ -14,6 +14,10 @@ const path = require('path'); const TITLE = 'BASIC Computer Games'; const JAVASCRIPT_FOLDER = 'javascript'; 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) { const creatFileLink = (file, name = path.basename(file)) => { @@ -98,7 +102,8 @@ function findJSFilesInFolder(folder) { const entries = [ ...htmlFiles, ...mjsFiles - ]; + ].filter(file => !IGNORE_FILES.includes(file)); + console.log(entries); diff --git a/84_Super_Star_Trek/javascript/cli.mjs b/84_Super_Star_Trek/javascript/cli.mjs index bacceff8..4277c232 100644 --- a/84_Super_Star_Trek/javascript/cli.mjs +++ b/84_Super_Star_Trek/javascript/cli.mjs @@ -2,12 +2,9 @@ import { onExit, onPrint, onInput, - setGameOptions, - getGameState, gameMain, } from "./superstartrek.mjs"; -import util from "util"; import readline from "readline"; onExit(function exit() { diff --git a/index.html b/index.html index 7d55fa1e..79c3031f 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -BASIC Computer Games

BASIC Computer Games

\ No newline at end of file +BASIC Computer Games

BASIC Computer Games

\ No newline at end of file