Browse Source

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.
redux
David Majda 6 years ago
parent
commit
c50ad15461
  1. 6
      benchmark/README.md
  2. 1
      package.json
  3. 6
      spec/README.md

6
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.

1
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"
},

6
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).
Loading…
Cancel
Save