From f10281499891220a6193207f8397c3f37bff9970 Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 9 May 2014 15:04:56 +0200 Subject: [PATCH] Rewrite spec/README.md More clarity, better grammar (hopefully). --- spec/README.md | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/spec/README.md b/spec/README.md index 4ca3a62..1057d6e 100644 --- a/spec/README.md +++ b/spec/README.md @@ -4,41 +4,42 @@ PEG.js Spec Suite This is the PEG.js spec suite. It ensures PEG.js works correctly. All specs should always pass on all supported platforms. -Running in a browser --------------------- +Running in Node.js +------------------ - 1. Make sure you have Node.js and all the development dependencies specified - in `package.json` installed. +All commands in the following steps need to be executed in PEG.js root directory +(one level up from this one). - 2. Run the following command in the PEG.js root directory (one level up from - this one): + 1. Install all PEG.js dependencies, including development ones: - make browser + $ npm install - 3. Start a web server and make it serve the PEG.js root directory. + 2. Execute the spec suite: - 4. Point your browser to an URL corresponding to the `index.html` file. + $ make spec - 5. Watch the specs pass (or fail). + 3. Watch the specs pass (or fail). -If you have Python installed, you can fulfill steps 3 and 4 by running the -following command in the PEG.js root directory +Running in the browser +---------------------- - python -m SimpleHTTPServer +All commands in the following steps need to be executed in PEG.js root directory +(one level up from this one). -and loading -[http://localhost:8000/spec/index.html](http://localhost:8000/spec/index.html) -in your browser. + 1. Make sure you have Node.js and Python installed. -Running from a command-line ---------------------------- + 2. Install all PEG.js dependencies, including development ones: - 1. Make sure you have Node.js and all the development dependencies specified - in `package.json` installed. + $ npm install - 2. Run the following command in the PEG.js root directory (one level up from - this one): + 3. Build browser version of PEG.js: - make spec + $ make browser - 3. Watch the specs pass (or fail). + 4. Serve PEG.js root directory using a web server: + + $ python -m SimpleHTTPServer + + 5. Point your browser to the [spec suite](http://localhost:8000/spec/index.html). + + 6. Watch the specs pass (or fail).