From 2bb9e040ecc23c1d268784d27c0047c6f5620d88 Mon Sep 17 00:00:00 2001 From: Will Scullin Date: Mon, 4 Mar 2019 19:55:35 -0800 Subject: [PATCH] Update directions, dev server. --- README.md | 40 +++++++++++++++++++++++++++++++++++----- package.json | 4 ++-- webpack.config.js | 4 ++-- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8a66277..239c849 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,41 @@ apple2js ======== -An Apple II emulator written in Javascript +An Apple II emulator written in Javascript. -Things are a little rought around the edges right now, hopefully I will have -time to clean things up in a bit. +Things are still a little rough around the edges right now, hopefully I will have more time to clean things up. -To run, open apple2js.html +First -To add additional disk images, use scripts/dsk2json.pl, then "make index" +```sh +npm install +``` + +To run a development server + +```sh +npm run dev +``` + +The open either +[http://localhost:8080/apple2js.html](http://localhost:8080/apple2js.html) or +[http://localhost:8080/apple2jse.html](http://localhost:8080/apple2jse.html) + +To build a static distribution into `dist` + +```sh +npm run build +``` + +To add additional disk images, use + +```sh +./bin/dsk2json -c Category -n Name path/to/image.dsk > json/disks/ +image.json` +``` + +then + +```sh +./bin/index` +``` diff --git a/package.json b/package.json index 4ea4761..f929714 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "Apple II Emulator in JavaScript", "scripts": { "build": "webpack --mode=production", + "dev": "webpack-dev-server", "index": "scripts/index.pl > json/disks/index.js", - "lint": "eslint js", - "start": "webpack-dev-server" + "lint": "eslint js" }, "repository": { "type": "git", diff --git a/webpack.config.js b/webpack.config.js index f3c7778..0f1c4a8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,7 +14,7 @@ module.exports = }, devServer: { compress: true, - watchContentBase: true, - writeToDisk: true + publicPath: '/dist/', + watchContentBase: true } };