diff --git a/demo-shell-ng2/README.md b/demo-shell-ng2/README.md index b389601f39..29daf4aa3b 100644 --- a/demo-shell-ng2/README.md +++ b/demo-shell-ng2/README.md @@ -1,7 +1,7 @@

Alfresco Angular 2 Components

- alfresco + alfresco angular2

@@ -11,11 +11,11 @@

-### Prerequisites +## Prerequisites - [Alfresco Docker image with CORS support](https://github.com/wabson/alfresco-docker-cors) -### Start development +## Start development Install the npm packages described in the `package.json` and verify that it works: @@ -32,23 +32,27 @@ Remember the npm scripts in `package.json`: * To runs the compiler and a server at the same time, both in "watch mode" ```$ npm start``` + +* To runs the test + + ```$ npm test``` * To runs the TypeScript compiler once - ```$ npm run tsc`` + ```$ npm run tsc``` * To runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them - ```$ npm run tsc:w`` + ```$ npm run tsc:w``` * To runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by [John Papa](https://github.com/johnpapa) and [Christopher Martin](https://github.com/cgmartin) with excellent support for Angular apps that use routing. - ```$ npm run lite`` + ```$ npm run lite``` * To runs the typings tool - ```$ npm run typings`` + ```$ npm run typings``` * called by *npm* automatically *after* it successfully completes package installation. This script installs the TypeScript definition files this app requires - ```$ npm run postinstall`` + ```$ npm run postinstall``` diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 05ec339c18..3a71da1938 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -6,6 +6,7 @@ "build.prod": "gulp build", "prestart": "npm install", "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", + "test": "live-server --open=test/tests-runner.html", "tsc": "tsc", "tsc:w": "tsc -w", "lite": "lite-server", @@ -37,6 +38,7 @@ "gulp-typescript": "^2.8.0", "jasmine-core": "2.4.1", "lite-server": "^2.2.0", + "live-server":"^0.9.2", "tsconfig-glob": "^0.3.3", "typescript": "^1.8.10", "typings": "^0.7.12" diff --git a/demo-shell-ng2/test/tests-runner.html b/demo-shell-ng2/test/tests-runner.html new file mode 100644 index 0000000000..b89b05a737 --- /dev/null +++ b/demo-shell-ng2/test/tests-runner.html @@ -0,0 +1,17 @@ + + + + + Ng App Unit Tests + + + + + + + + + +