- Node Version 20.3.1
- NPM
- DOjS version 1.20.1
- DosBox (Optional for testing)
This repository is only tested in a Linux environment. For Windows use WSL
Clone the repository or fork. On your modern machine run:
npm installCreate a folder dist/dojs and copy a installation of DOjS version to it.
Or run the ./setup.sh to do this all for you
To build the JS files run
npm run buildTo generate types from the lib folder run:
npm run typesTo run the application in Linux you can use ./run.sh to boot up dosbox-x from flatpak.
The typescripts definitions are created from the js files found in jsboot.zip and DOjS the JS files used for creating the documentation.
To compile the typescript to javascript we will use the the default typescript compiler.
The compile starts in src/main.ts and compile everything in the folder build.
After that is done the files are compiled js files are modified with jsCodeshift.
It modifies the following things.
- in the
main.jsthe lineObject.defineProperty(exports, "__esModule", { value: true });is removed. (exports in not available in main.js) - fix require path to use the root of the build folder instead of path of the file.
After that all is done the files are copied to
- The building of the project can be improved. It just a bunch of scripts.
- p5js files are ignored in the generation, gave alot of errors.
- Some files in
jsbootare changed from the original source. - The file
lib/dojs/IniFile.jsfunction signature that gives error when compiling typescript
Some website and packages I used to make it all work