Index: third_party/pkg/angular/scripts/karma_run.sh |
diff --git a/third_party/pkg/angular/scripts/karma_run.sh b/third_party/pkg/angular/scripts/karma_run.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..bfe220c601ff8461868877c85aa09898396003eb |
--- /dev/null |
+++ b/third_party/pkg/angular/scripts/karma_run.sh |
@@ -0,0 +1,20 @@ |
+#!/bin/bash |
+ |
+. $(dirname $0)/env.sh |
+ |
+# Check for node |
+if [ -z "$(which node)" ]; then |
+ echo "node.js does not appear to be on the path." |
+ echo "You can obtain it from http://nodejs.org" |
+ exit 1; |
+fi |
+ |
+# Check for karma |
+KARMA_PATH="$NGDART_BASE_DIR/node_modules/karma/bin/karma" |
+if [ ! -e "$KARMA_PATH" ]; then |
+ echo "karma does not appear to be installed. Installing:" |
+ cd $NGDART_BASE_DIR |
+ npm install |
+fi |
+ |
+$DARTANALYZER $NGDART_BASE_DIR/lib/angular.dart && node $KARMA_PATH run --port=8765 |