From c800f1c5695c4d1583251eeae99b9f8cf3623620 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sat, 23 Nov 2019 22:00:00 +0200 Subject: doc: README for demo, explain about running tests --- README.md | 18 ++++++++++++++++-- demo/README.md | 9 +++++++++ package.json | 3 ++- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 demo/README.md diff --git a/README.md b/README.md index b6d48e3..98c2743 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,25 @@ JavaScript implementation of the AVR 8-bit architecture ## Running the demo project -The demo project allows you to edit and run Arduino code. It includes 2 simulated LEDs -connected to pins 12 and 13 (PB4 and PB5). +The demo project allows you to edit Arduino code, compile it, and run it in the simulator. +It also simulates 2 LEDs connected to pins 12 and 13 (PB4 and PB5). To run the demo project, check out this repository, run `npm install` and then `npm start`. +## Running the tests + +Run the tests once: + +``` +npm test +``` + +Run the tests of the files you modified since last commit (watch mode): + +``` +npm run test:watch +``` + ## License Copyright (C) 2019, Uri Shaked. The code is released under the terms of the MIT license. \ No newline at end of file diff --git a/demo/README.md b/demo/README.md new file mode 100644 index 0000000..9be5c19 --- /dev/null +++ b/demo/README.md @@ -0,0 +1,9 @@ +# AVR8js Demo + +AVR8js + Monaco Editor. To run this demo: + +1. Install dependencies: `npm install` +2. Start the code: `npm start` +3. Go to http://localhost:1234/ and start tinkering + +The demo is configured to automatically reload the app whenever you change the code. diff --git a/package.json b/package.json index b311c6e..7840719 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "prepare": "npm run build", "start": "parcel demo/src/index.html -d demo/build", "lint": "tslint --project tsconfig.json", - "test": "jest" + "test": "npm run lint && jest", + "test:watch": "jest --watch" }, "files": [ "dist" -- cgit v1.2.3