-
Notifications
You must be signed in to change notification settings - Fork 16
Developer Setup
Ronny Mikalsen edited this page Apr 18, 2018
·
23 revisions
This is a library for Angular, implementing the Angular Package Format v6.0.
Features:
- the Mime IIIF viewer library
- unit test for the library
- a demo application that consumes the library in JIT mode and runs in watch mode
- an integration app that consumes the library in JIT and AOT mode and runs e2e tests
- Make sure you have node installed with a version at least 7.0.0.
- Run
npm install -g yarn
to install Yarn. - Run
npm install -g @angular/cli
to install Angular Cli - Fork the NationalLibraryOfNorway/ngx-mime repo.
- Clone your fork. Recommendation: name your git remotes
upstream
forNationalLibraryOfNorway/ngx-mime
and<your-username>
for your fork. - From the root of the project,
run yarn install
.
Common tasks are present as npm scripts:
-
npm start
to run a live-reload server with the demo app -
npm run test
to test in watch mode, ornpm run test:once
to only run once -
npm run build
to build the library -
npm run lint
to lint -
npm run clean
to clean -
npm run integration
to run the integration e2e tests on all browsers -
npm run integration:chrome
to run the integration e2e tests on chrome -
npm run integration:firefox
to run the integration e2e tests on firefox -
npm install --no-save ./relative/path/to/lib
afternpm run build
to test locally in another app
If you need to debug the integration app, please check ./integration/README.md
.
When working with integration tests:
-
npm run mountebank
to start api mock -
npm run start
to start integration app
To run all protractor tests on chrome
-
npm run protractor:chrome
ornpm run protractor:chrome:headless
To run all protractor tests on firefox
npm run protractor:firefox
To run specific tests:
protractor --browser=chrome --tags=@desktop --feature=zoom --headless