From 3abfb0f9732be7846f5ac7719718bb5a656a1518 Mon Sep 17 00:00:00 2001 From: Guillaume Carbonneau Date: Thu, 18 Aug 2016 10:48:22 -0400 Subject: [PATCH] Change instructions to use node's http-server instead of going into python land (#3364) * Change instructions to use node's http-server instead of going into python land * Node scripts have the local node_modules/.bin/ automatically in their path --- README.md | 4 ++-- package.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c01ecd67e..87adad20a 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ To run the current development version of iD on your own computer: 2. (Windows Only) Run `fixWinSymlinks.bat`. This script will prompt for Administrator rights. see also: http://stackoverflow.com/questions/5917249/git-symlinks-in-windows 3. Run `npm install` 4. Run `make` -5. Start a local web server, e.g. `python -m SimpleHTTPServer` -6. Open `http://localhost:8000/` in a web browser +5. Start the local web server `npm run-script web` +6. Open `http://localhost:8080/` in a web browser For guidance on building a packaged version, running tests, and contributing to development, see [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/package.json b/package.json index 932f7b8f8..1f92ddd0e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "scripts": { "test": "npm run lint && make && phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html dot", "start": "rollup --config=./rollup.config.js -w --input ./modules/id.js --output dist/iD.js", + "web": "http-server", "build": "rollup --config=./rollup.config.js -f iife --input ./modules/id.js --output dist/iD.js && uglifyjs dist/iD.js -c -m -o dist/iD.min.js", "lint": "eslint js/id test/spec modules" }, @@ -40,6 +41,7 @@ "eslint": "~3.3.1", "glob": "~7.0.5", "happen": "~0.3.1", + "http-server": "0.9.0", "js-yaml": "~3.6.1", "jsonschema": "~1.1.0", "maki": "0.5.0",