-
Notifications
You must be signed in to change notification settings - Fork 16
Developer Setup
Ronny Mikalsen edited this page Jan 18, 2022
·
23 revisions
This is a library for Angular, implementing the Angular Package Format v9.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
- Angular requires a current, active LTS, or maintenance LTS version of Node.js.
- Install Yarn (https://yarnpkg.com)
- Install Nrwl Extensions for Angular (Nx) (https://github.com/nrwl/nx)
- 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,
yarn install
.
-
yarn build
to build the library -
yarn start:demo
to run a live-reload server with the demo app - You can test one project, like this:
ng test ngx-mime
- You can test all projects using
yarn affected:*
, like this:yarn affected:test --all
- Ideally, though, you would only retest the things that were affected by your change:
yarn affected:test --base=master --head=HEAD
- And you can also do it in parallel:
yarn affected:test --base=master --head=HEAD --parallel
- Retest only the failed projects that:
yarn affected:test --base=master --head=HEAD --parallel --only-failed
-
yarn affected:lint --all
to lint -
yarn e2e
to run e2e tests on chrome -
yarn e2e:chrome
to run e2e tests on chrome -
yarn e2e:firefox
to run e2e tests on firefox - See https://yarnpkg.com/lang/en/docs/cli/link/ to test locally in another app
-
yarn mountebank
to start api mock -
yarn start:integration
to start integration app
To run all protractor tests on chrome
-
yarn protractor:chrome
oryarn protractor:chrome:headless
To run all protractor tests on firefox
yarn protractor:firefox
To run specific tests:
protractor apps/integration-e2e/protractor.conf.js --browser=chrome --tags=@desktop --feature=zoom --headless