Skip to content

Commit

Permalink
Merge pull request #75 from bengarrett/minor-update
Browse files Browse the repository at this point in the history
Minor update
  • Loading branch information
bengarrett authored May 30, 2024
2 parents 11a71ac + 1f59560 commit 2f66eac
Show file tree
Hide file tree
Showing 17 changed files with 265 additions and 288 deletions.
133 changes: 0 additions & 133 deletions .eslintrc.js

This file was deleted.

6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ node_modules
.yarn
.yarnrc.yml
package-lock.json
pnpm-lock.yaml
yarn.lock

# Hide dependencies
build
pub
build/
pub/
tmp/

# Packs
*.tgz
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"eslint.alwaysShowStatus": true,
"editor.formatOnSave": true
}
6 changes: 6 additions & 0 deletions docs/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Changes and updates

### v1.8.5

- Minor update to fix internal path issues, DOSee should work with subdirectories now.
- Removed yarn installation requirements.
- Updated ESLint to v9.

### v1.8.0

- Fixed DOSee incorrectly interpreting backslashes as new commands,
Expand Down
33 changes: 12 additions & 21 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ DOSee is a front-end for an [MS-DOS](https://en.wikipedia.org/wiki/MS-DOS) emula

DOSee is only a user interface and installation process for an incredible emulation ecosystem. Many remarkable people created it over many years. DOSee itself is a fork of [The Emularity](https://github.com/db48x/emularity) project started by the Internet Archive. [EM-DOSBox](https://github.com/dreamlayers/em-dosbox/), the core of this emulation, is a JavaScript port of [DOSBox](https://www.dosbox.com), the world's most popular MS-DOS emulator.

---

![DOSee preview](../src/images/preview.png)

### What's new
Expand All @@ -23,45 +25,34 @@ DOSee is only a user interface and installation process for an incredible emulat

### Requirements

- A web browser that supports JavaScript ES6 (ECMAScript 2015).<br>
Current Firefox, Chrome, Edge, Brave or Safari will work fine.
- A web browser that supports service workers.<br>
Current Chrome, Edge, Safari, or Firefox will work fine.
- A physical keyboard, as MS-DOS is a text-based operating system.
- [Node.js](https://nodejs.org) plus [yarn](https://yarnpkg.com)/[npm](https://www.npmjs.com) or [Docker](https://www.docker.com/get-started)
- [Node.js](https://nodejs.org) or [Docker](https://www.docker.com/get-started)

**DOSee runs over an HTTP server**, and it can not function over the `file:///` browser protocol.

### Instructions, _download, build and serve_
## Instructions, _download, build and serve_

DOSee requires a build before it can serve to a web browser.

```bash
# clone DOSee
git clone https://github.com/bengarrett/DOSee.git
git clone git@github.com:bengarrett/DOSee.git
cd DOSee

# install dependencies & build
yarn # npm install
npm install # (or the equivalent in another package manager)

# serve DOSee over port 8086
yarn run serve # npm run serve
```

Point a web browser to http://localhost:8086

### Docker instructions

There is an [image at Docker Hub](https://hub.docker.com/r/bengarrett/dosee).
```bash
docker run --name dosee_app -i -p 8086:80 bengarrett/dosee
npm run serve
```

Point a web browser to http://localhost:8086

### Usage & customisations

[Are in the USAGE document](USAGE.md)

### Editing the source JS or HTML
## Editing the source JS or HTML

If you edit the source files in `src/` you will need to rebuild the application.

Expand All @@ -70,10 +61,10 @@ If you edit the source files in `src/` you will need to rebuild the application.
cd DOSee

# re-build DOSee using your edits
yarn run install # npm run install
npm run install

# serve the modified DOSee over port 8086
yarn run serve # npm run serve
npm run serve
```

Point a web browser to http://localhost:8086
Expand Down
92 changes: 92 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// eslint.config.mjs
// ESLint v9 flat configuration for JavaScript and JavaScript modules.
import globals from "globals";
import js from "@eslint/js";

export default [
{
ignores: ["build/**", "src/emulator/**", "workbox-config.js"],
},
js.configs.recommended,
{
files: ["src/**/*.js"],
languageOptions: {
ecmaVersion: "latest",
parserOptions: {
ecmaFeatures: {
impliedStrict: true,
},
},
globals: {
...globals.browser,
BrowserFS: "readonly",
DOSee: "readonly",
DoseeLoader: "readonly",
Emulator: "readonly",
FileSaver: "readonly",
FS: "writable",
Module: "writable",
},
},
linterOptions: {
noInlineConfig: false,
reportUnusedDisableDirectives: "error",
},
rules: {
"no-useless-assignment": "error",
"require-atomic-updates": "error",
"accessor-pairs": "warn",
"symbol-description": "warn",
"no-eval": "error",
"no-empty-function": "warn",
"no-empty": "warn",
"no-else-return": "warn",
"no-bitwise": "warn",
"no-var": "warn",
"no-undefined": "warn",
"no-undef-init": "warn",
"no-useless-constructor": "warn",
"no-useless-concat": "warn",
"no-useless-computed-key": "warn",
"no-unneeded-ternary": "warn",
"prefer-template": "warn",
"prefer-spread": "warn",
"prefer-rest-params": "warn",
"prefer-const": "warn",
"prefer-arrow-callback": "warn",
"operator-assignment": "warn",
"no-throw-literal": "warn",
"no-script-url": "warn",
"no-return-assign": "warn",
"no-proto": "warn",
"no-param-reassign": "warn",
"no-octal-escape": "warn",
"no-object-constructor": "warn",
"no-new-wrappers": "warn",
"no-new-func": "warn",
"no-new": "warn",
"no-nested-ternary": "warn",
"no-negated-condition": "warn",
"no-multi-assign": "warn",
"no-magic-numbers": [
"warn",
{
ignore: [-1, 0, 1, 2],
ignoreArrayIndexes: true,
ignoreDefaultValues: true,
ignoreClassFieldInitialValues: true,
enforceConst: true,
},
],
"no-loop-func": "warn",
"no-lonely-if": "warn",
"no-implied-eval": "warn",
"no-implicit-globals": "warn",
"no-implicit-coercion": "warn",
"default-case-last": "warn",
"dot-notation": "warn",
eqeqeq: "warn",
"no-extend-native": "error",
},
},
];
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
"email": "code.by.ben@gmail.com"
},
"dependencies": {
"browserfs": "1.4.x",
"browserfs-zipfs-extras": "1.0.x",
"canvas-toBlob": "1.0.x",
"copyfiles": "2.x",
"browserfs": "1.4.3",
"browserfs-zipfs-extras": "1.0.1",
"canvas-toBlob": "1.0.0",
"copyfiles": "~2.4.1",
"file-saver-fixed": "1.3.8",
"http-server": "x",
"mini.css": "3.x",
"workbox-cli": "6.x"
"globals": "^15.3.0",
"http-server": "^14.1.1",
"mini.css": "~3.0.1",
"workbox-cli": "~6.6.0"
},
"description": "A DOSBox-based MS-DOS emulator for the web",
"devDependencies": {
"eslint": "x",
"eslint-config-prettier": "x",
"htmlhint": "x",
"prettier": "x"
"eslint": "^9.3.0",
"eslint-config-prettier": "^9.1.0",
"htmlhint": "^1.1.4",
"prettier": "^3.2.5"
},
"homepage": "https://github.com/bengarrett/DOSee",
"funding": {
Expand All @@ -34,11 +35,10 @@
"url": "git+https://github.com/bengarrett/DOSee.git"
},
"scripts": {
"copy": "npx copyfiles -u 1 src/**/**/* src/**/* src/* build && npx copyup -f node_modules/workbox-sw/build/workbox-sw.js build/js && npx copyup -f node_modules/mini.css/dist/mini-default.min.css build/css && npx copyup -f node_modules/browserfs/dist/browserfs.min.js node_modules/browserfs-zipfs-extras/dist/browserfs-zipfs-extras.js node_modules/file-saver-fixed/dist/FileSaver.min.js node_modules/canvas-toBlob/canvas-toBlob.js build/js",
"install": "npm run copy && npx workbox injectManifest workbox-config.js",
"serve": "npx http-server build -p 8086",
"copy": "npx copyfiles -u 1 src/**/**/* src/**/* src/* build && npx copyup -f tmp/workbox-v6.6.0/workbox-sw.js build/js && npx copyup -f node_modules/mini.css/dist/mini-default.min.css build/css && npx copyup -f node_modules/browserfs/dist/browserfs.min.js node_modules/browserfs-zipfs-extras/dist/browserfs-zipfs-extras.js node_modules/file-saver-fixed/dist/FileSaver.min.js node_modules/canvas-toBlob/canvas-toBlob.js build/js",
"install": "npx workbox-cli copyLibraries tmp && npm run copy && npx workbox injectManifest workbox-config.js",
"serve": "npx http-server build --port 8086",
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.8.0",
"packageManager": "yarn@3.2.0"
}
"version": "1.8.5"
}
Loading

0 comments on commit 2f66eac

Please sign in to comment.