You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-3Lines changed: 25 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,14 @@
2
2
NodeToJS is a module/library at once: a module for NodeJS and a library for Javascript (JS). It allows to create text based apps/games that can be executed and work both in the terminal (for Windows, Linux or Mac) and in a web browser. That is, with the same code you will create a CLI app/game and a text-based webapp/webgame.
3
3
4
4
### Use:
5
-
The minimum files you need are three: a wrap file (game.html), the NodeToJS module/library (NODEtoJS.js), and a NodeJS or Javascript file that starts your js application.
5
+
The minimum files you need are four:
6
+
- A wrap file: app.html
7
+
- A monospace font. I recommend: HP_100LX_10x11.woff
8
+
You can get old PC fonts here: https://int10h.org/oldschool-pc-fonts/fontlist/
9
+
- The NodeToJS module/library: NODEtoJS.js
10
+
- Your main .js file. app.js
11
+
12
+
### Hello world example.
6
13
7
14
1. Your HTML wrap file (for example app.html) will load the NodeToJS library (NodeToJS.js) and will load the starter NodeJS/Javascript script of yout app (app.js in this example). You also have to add NodeToJS.HTMLMODE=1 right after loading the library/module and before loading your scripts.
8
15
@@ -13,11 +20,26 @@ app.html
13
20
<script src="app.js></script>
14
21
```
15
22
2. Your apps.js must contain at least the following code. It is the first thing that has to be executed.
0 commit comments