Skip to content

Commit

Permalink
Merge pull request #7 from EyeSeeTea/development
Browse files Browse the repository at this point in the history
Release 1.4.0
  • Loading branch information
adrianq authored Feb 15, 2023
2 parents 2deef64 + a9e9f5c commit d9af705
Show file tree
Hide file tree
Showing 1,432 changed files with 8,810 additions and 205,871 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HOST=localhost
PORT=8002
REACT_APP_DHIS2_BASE_URL="http://localhost:8080"
REACT_APP_DHIS2_AUTH="admin:district"
48 changes: 44 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
.idea/
.project
.settings/
.tern-project
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/bower_components

# testing
/coverage

# production
manifest.webapp
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.sublime-project
*.sublime-workspace
*.code-workspace
*.zip

npm-debug.log*
yarn-debug.log*
yarn-error.log*

src/locales/
src/react-app.d.ts
src/react-app-env.d.ts
bak
.eslintcache

# cypress
cypress/screenshots/
cypress/videos/
cypress/fixtures/

# IntelliJ
.idea/*

# VS Code
.vscode/*
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build
assets
node_modules
bower_components
*.min.js
*.min.css
18 changes: 18 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @format */

module.exports = {
printWidth: 120,
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: false,
trailingComma: "es5",
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: "avoid",
rangeStart: 0,
rangeEnd: Infinity,
proseWrap: "preserve",
requirePragma: false,
insertPragma: false,
};
Binary file removed HMIS_Dictionary.zip
Binary file not shown.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,33 @@ Some elements are still hardcoded:
- The search panel will not show *dataElements* or *indicators* that are not associated to a *dataSet* or an *indicatorGroup*
- Only *dataElements* in the aggregated domain are currently taken into account: [app/search/search.services.js#L7](https://github.com/msf-ocba/HMIS_Dictionary/blob/master/app/search/search.services.js#L7), [app/search/search.services.js#L11](https://github.com/msf-ocba/HMIS_Dictionary/blob/master/app/search/search.services.js#L11) and [app/search/search.services.js#L14](https://github.com/msf-ocba/HMIS_Dictionary/blob/master/app/search/search.services.js#L14)
- The app is currently available in English, French, Spanish and Portuguese and uses the content of DHIS2 in these 4 languages (as available per MSF OCBA configuration): [app/app.config.js#L60](https://github.com/msf-ocba/HMIS_Dictionary/blob/master/app/app.config.js#L60), [app/dossiersEditor/dossiersEditor.controllers.js#L44](https://github.com/msf-ocba/HMIS_Dictionary/blob/master/app/dossiersEditor/dossiersEditor.controllers.js#L44) and [languages/](https://github.com/msf-ocba/HMIS_Dictionary/tree/master/languages).


## Setup and Installation

Build the app running:

```console
shell:~$ yarn install # first time only
shell:~$ yarn build
```
This will create a `hmis-dictionary.zip` file that can be manually installed in DHIS2 App Management.

## Development

The above mentioned method of deploying the app is not suited for development. To deploy a local instance of the app use:
```console
shell:~$ HOST=<address> PORT=<port> REACT_APP_DHIS2_BASE_URL=<dhis2_instance_url> REACT_APP_DHIS2_AUTH=<user:passwd> yarn start
```
For example:
```console
shell:~$ HOST=localhost PORT=8082 REACT_APP_DHIS2_BASE_URL=http://localhost:8080 REACT_APP_DHIS2_AUTH='admin:district' yarn start
```

This deploys a [http-server](https://github.com/http-party/http-server) serving the app with a proxy to the DHIS2 instance to serve the DHIS2 API calls.
The `yarn start` command reads the variables present in `.env.local` to start the local server. Use `.env` as a template to create it.

The app package manager has been migrated from `bower` to `yarn` with [bower-away](https://github.com/sheerun/bower-away). The `build-bower-deps.sh` script is used as a postinstall script to make a copy of the necessary files to the `bower_components` folder to avoid uploading unnecessary files with the app build zip file.

## Feedback

[email protected]
Loading

0 comments on commit d9af705

Please sign in to comment.