From e15a3f273f37f04027c8262420c6c22c3a3ab1e3 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 7 Dec 2016 21:41:21 -0800 Subject: [PATCH] fix: Better instructions on running examples and their tests --- modules/@angular/examples/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/modules/@angular/examples/README.md b/modules/@angular/examples/README.md index 66cb927d1b..f287ffaae1 100644 --- a/modules/@angular/examples/README.md +++ b/modules/@angular/examples/README.md @@ -3,3 +3,32 @@ This folder contains small example apps that get in-lined into our API docs. Each example contains tests for application behavior (as opposed to testing Angular's behavior) just like an Angular application developer would write. + +# Running the examples + +``` +# # execute the following command only when framework code changes +./build.sh + +# run when test change +./modules/@angular/examples/build.sh + +# start server +$(npm bin)/gulp serve-examples +``` + +navigate to [http://localhost:8001](http://localhost:8001) + +# Running the tests + +``` + # run only when framework code changes +./build.sh + +# run to compile tests and run them +./modules/@angular/examples/test.sh +``` + +NOTE: sometimes the http server does not exits properly and it retans the `8001` port. + in such a case you can use `lsof -i:8001` to see which process it is and then use `kill` + to remove it. (Or in single command: `lsof -i:8001 -t | xargs kill`) \ No newline at end of file