From c50ad1546129d7e67dda532b86d4c694ea990520 Mon Sep 17 00:00:00 2001 From: David Majda Date: Thu, 5 May 2016 17:35:40 +0200 Subject: [PATCH] Use http-server to serve specs and benchmarks to the browser Previously, the instructions recommended using Python's SimpleHTTPServer module, which created unnecessary dependency on Python. --- benchmark/README.md | 6 +++--- package.json | 1 + spec/README.md | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/benchmark/README.md b/benchmark/README.md index ee60cb5..9b1bc1b 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -31,7 +31,7 @@ Running in the Browser All commands in the following steps need to be executed in PEG.js root directory (one level up from this one). - 1. Make sure you have Node.js and Python installed. + 1. Make sure you have Node.js installed. 2. Install all PEG.js dependencies, including development ones: @@ -48,9 +48,9 @@ All commands in the following steps need to be executed in PEG.js root directory 4. Serve PEG.js root directory using a web server: ```console - $ python -m SimpleHTTPServer + $ node_modules/.bin/http-server ``` - 5. Point your browser to the [benchmark suite](http://localhost:8000/benchmark/index.html). + 5. Point your browser to the [benchmark suite](http://localhost:8080/benchmark/index.html). 6. Click the **Run** button and wait for results. diff --git a/package.json b/package.json index df3f081..87c12eb 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "devDependencies": { "browserify": "11.2.0", "eslint": "1.10.3", + "http-server": "0.9.0", "jasmine-node": "1.14.5", "uglify-js": "2.4.24" }, diff --git a/spec/README.md b/spec/README.md index feb6328..fc1376a 100644 --- a/spec/README.md +++ b/spec/README.md @@ -30,7 +30,7 @@ Running in the Browser All commands in the following steps need to be executed in PEG.js root directory (one level up from this one). - 1. Make sure you have Node.js and Python installed. + 1. Make sure you have Node.js installed. 2. Install all PEG.js dependencies, including development ones: @@ -47,9 +47,9 @@ All commands in the following steps need to be executed in PEG.js root directory 4. Serve PEG.js root directory using a web server: ```console - $ python -m SimpleHTTPServer + $ node_modules/.bin/http-server ``` - 5. Point your browser to the [spec suite](http://localhost:8000/spec/index.html). + 5. Point your browser to the [spec suite](http://localhost:8080/spec/index.html). 6. Watch the specs pass (or fail).