Hybrid mobile application for the BioPocket project.
-
npm install -g ionic cordova -
Chrome to run the automated tests
This section describes how to quickly set up your machine to contribute to the project.
Read the development guide for a more detailed technical introduction.
-
Clone this repository:
git clone https://github.com/MediaComem/biopocket-mobile.git -
Install the application's dependencies:
cd biopocket-mobile npm ci -
Create your development environment's configuration file:
cp src/environments/environment.sample.ts src/environments/environment.dev.tsUpdate the
backendUrlproperty to the URL of a running BioPocket Backend.
Run npm start (it will open your browser to visit http://localhost:8100/).
npm run test:unitto run the unit testsnpm run test:e2eto run the end-to-end tests (this requires additional setup)npm run testto run all tests (this requires additional setup for the end-to-end tests)
You can add :watch to each of these to automatically re-run the tests when files change (e.g. npm run test:unit:watch).
Tip: only use test:unit:watch to watch for changes.
Using test:e2e:watch (or test:watch) is not very reliable because
ionic serve and test:e2e:watch will both refresh when you make changes,
and sometimes the end-to-end tests will run before ionic serve has had time
to refresh the app.
| Script | Purpose |
|---|---|
npm start |
Initialize & start the app with ionic serve |
npm run apr |
Build the app for Android in a production environment; see releases |
npm run doctoc |
Generate the table of contents of this README and the DEVELOPMENT guide |
npm run ipr |
Buil the app for iOS in a production environment; see releases |
npm run lint |
Analyze and check the project's TypeScript code for errors |
npm run locales |
Compile the .yml locale files to TypeScript once |
npm run locales:start |
Compile the .yml locale files to TypeScript and watch for changes |
npm run locales:watch |
Compile the .yml locale files when changes occur |
npm run start:lab |
Start the app with the Ionic Lab feature |
npm run start:e2e |
Start the app for end-to-end testing |
npm run test |
Run all unit & end-to-end tests once (may fail if ionic serve is running; see end-to-end tests) |
npm run test:watch |
Run all unit & end-to-end tests and watch for changes (may fail if ionic serve is running; see end-to-end tests) |
npm run test:unit |
Run unit tests once |
npm run test:unit:watch |
Run unit tests and watch for changes |
npm run test:e2e |
Run end-to-end tests once (may fail if ionic serve is running; see end-to-end tests) |
npm run test:e2e:watch |
Run end-to-end tests when changes occur (may fail if ionic serve is running; see end-to-end tests) |
npm run test:e2e:fast |
Run end-to-end tests once (assumes backend & app are running in test mode; see end-to-end tests) |
npm run test:e2e:fast:watch |
Run end-to-end tests when changes occur (assumes backend & app are running in test mode; see end-to-end tests) |