This repository holds the files for the OpenLMIS Requisition Reference UI Module.
- Docker 1.11+
- Docker Compose 1.6+
- Fork/clone this repository from GitHub.
git clone https://github.com/OpenLMIS/openlmis-requisition-refUI.git- Develop w/ Docker by running
docker-compose run --service-ports requisition-refui. - You should now be in an interactive shell inside the newly created development environment, build the project with:
grunt buildand then you can start it withgrunt serve. - Go to
http://<yourDockerIPAddress>:9000/public/pages/login.htmlto see the login page. Note that you can determine yourDockerIPAddress by runningdocker-machine ip.
Grunt is our build tool. Grunt tasks available:
grunt serveto run projectgrunt buildto build all sources. After building sources, it also runs unit tests. Build will be successful only if all tests pass.grunt watchwill rebuild all the sources after every change — it doesn't run unit tests.grunt cleanto remove build artifacts.grunt karma:unitto run Jasmine unit tests.grunt karma:tddrun Jasmine unit tests in test driven development mode, where test will automatically rerun when openlmis.js is rebuilt or any test file is updated.grunt checkto run JSHint and LessLint tasks that perform code quality check.
--productionwill compress all UI related files to be used in production. Otherwise files are not compressed and include sourcemaps for easier debugging.--openlmisServerURLtakes an argument that will change the location where the OpenLMIS UI application will look for a OpenLMIS Server. This variable can also be set in config.json.--authServiceURLjust like openlmisServerURL, but for the location of the Openlmis Authentication Service. If this url doesn't start with 'http' it will be prefixed by the openlmisServerURL.--requisitionServiceURLjust like authServiceURL, but for the OpenLMIS Requisitions Service.--addProxyServicefor working with OpenLMIS servers or services that are on a different domain and don't implement CORs. This flag when run withgulp servewill start a CORS Anywhere server athttp://127.0.0.1:3030— Adding this flag togrunt buildorgrunt watchwill prepend any OpenLMIS URL withhttp://127.0.0.1:3030/so that all requests to OpenLMIS are CORS compliant.
Launches into shell with Grunt and all needed plugins needed for building UI module.
If you run the UI module, it should be available on port 9000.
> docker-compose run --service-ports requisition-refui
$ grunt build
$ grunt serveTo run OpenLMIS Requisition Reference UI Module with Requisition and Auth services, use [OpenLMIS-Blue] (https://github.com/OpenLMIS/openlmis-blue).
When the application is up and running, you should be able to access UI with http://localhost/public/pages/index.html
To log into the UI you can use following credentials:
login: admin
password: password
The specialized docker-compose.builder.yml is geared toward CI and build servers for automated building, testing and docker image generation of the UI module.
> docker-compose -f docker-compose.builder.yml run builder
> docker-compose -f docker-compose.builder.yml build imageTransifex has been integrated into the development and build process. In order to sync with the project's resources in Transifex, you must provide values for the following keys: TRANSIFEX_USER, TRANSIFEX_PASSWORD.
For the development environment in Docker, you can sync with Transifex by running the sync_transifex.sh script. This will upload your source messages file to the Transifex project and download translated messages files.
The build process has syncing with Transifex seamlessly built-in.