Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.

Commit b095693

Browse files
authored
New App Shell Tooling (#7)
* Consolidated and aligned repo structure * Prettified * Updated TypeScript * Updated root decorator * Finished adoption
1 parent b60e2bc commit b095693

File tree

7 files changed

+2715
-277
lines changed

7 files changed

+2715
-277
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
dist/
2+
node_modules/
13
**/*.css
24
**/*.md
35
**/*.json

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
moduleNameMapper: {
66
'\\.(css)$': 'identity-obj-proxy',
77
'@openmrs/esm-api': '<rootDir>/__mocks__/openmrs-esm-api.mock.tsx',
8-
'@openmrs/esm-module-config': '<rootDir>/__mocks__/openmrs-esm-module-config.mock.tsx',
8+
'@openmrs/esm-config': '<rootDir>/__mocks__/openmrs-esm-module-config.mock.tsx',
99
'@openmrs/esm-error-handling': '<rootDir>/__mocks__/openmrs-esm-error-handling.mock.tsx',
1010
'@openmrs/esm-styleguide': '<rootDir>/__mocks__/openmrs-esm-styleguide.mock.tsx',
1111
'react-i18next': '<rootDir>/__mocks__/react-i18next.js',

package-lock.json

Lines changed: 2669 additions & 237 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openmrs/esm-drugorder-app",
3-
"version": "0.1.2",
3+
"version": "0.2.0",
44
"description": "Drug order microfrontend for the OpenMRS SPA",
55
"main": "dist/openmrs-esm-drugorder.js",
66
"types": "src/index.ts",
@@ -15,15 +15,15 @@
1515
"prepublishOnly": "npm run build",
1616
"test": "jest"
1717
},
18+
"browserslist": [
19+
"extends browserslist-config-openmrs"
20+
],
1821
"keywords": [
1922
"openmrs"
2023
],
2124
"publishConfig": {
2225
"access": "public"
2326
},
24-
"browserslist": [
25-
"extends browserslist-config-openmrs"
26-
],
2727
"husky": {
2828
"hooks": {
2929
"pre-commit": "pretty-quick --staged && concurrently 'npm:test' 'npm:typescript' 'npm:lint'"
@@ -33,15 +33,42 @@
3333
"type": "git",
3434
"url": "git+https://github.com/openmrs/openmrs-esm-drugorder.git"
3535
},
36+
"bugs": {
37+
"url": "https://github.com/openmrs/openmrs-esm-drugorder/issues"
38+
},
39+
"dependencies": {
40+
"@carbon/icons-react": "^10.18.0",
41+
"carbon-components-react": "^7.19.0",
42+
"lodash-es": "^4.17.15"
43+
},
44+
"peerDependencies": {
45+
"@openmrs/esm-error-handling": "^3.0.0",
46+
"@openmrs/esm-api": "^3.0.0",
47+
"@openmrs/esm-extensions": "^3.0.0",
48+
"@openmrs/esm-config": "^3.0.0",
49+
"@openmrs/esm-patient-chart-widgets": "^1.0.3",
50+
"@openmrs/esm-styleguide": "^3.0.0",
51+
"carbon-components": "^10.19.0",
52+
"carbon-icons": "^7.0.7",
53+
"i18next": "^19.4.2",
54+
"react": "^16.9.0",
55+
"react-dom": "^16.9.0",
56+
"react-i18next": "^11.3.4",
57+
"rxjs": "^6.6.2"
58+
},
3659
"devDependencies": {
3760
"@babel/core": "^7.5.5",
3861
"@babel/plugin-proposal-class-properties": "^7.5.5",
3962
"@babel/preset-env": "^7.5.5",
4063
"@babel/preset-react": "^7.0.0",
4164
"@babel/preset-typescript": "^7.3.3",
42-
"@carbon/icons-react": "^10.18.0",
43-
"@openmrs/esm-error-handling": "^1.1.0",
44-
"@openmrs/react-root-decorator": "^2.0.0",
65+
"@openmrs/esm-api": "^3.0.0",
66+
"@openmrs/esm-config": "^3.0.0",
67+
"@openmrs/esm-error-handling": "^3.0.0",
68+
"@openmrs/esm-extensions": "^3.0.0",
69+
"@openmrs/esm-patient-chart-widgets": "^1.0.3",
70+
"@openmrs/esm-styleguide": "^3.0.0",
71+
"@openmrs/react-root-decorator": "^3.3.1",
4572
"@testing-library/jest-dom": "^5.7.0",
4673
"@testing-library/react": "^9.5.0",
4774
"@types/carbon-components-react": "^7.10.9",
@@ -53,24 +80,11 @@
5380
"@types/react-router-dom": "^5.1.5",
5481
"@types/single-spa-react": "^2.12.0",
5582
"@types/webpack-env": "^1.15.1",
56-
"@openmrs/esm-api": "^3.0.0",
57-
"@openmrs/esm-extension-manager": "^0.1.1",
58-
"@openmrs/esm-module-config": "^2.2.0",
59-
"@openmrs/esm-patient-chart-widgets": "^1.0.3",
60-
"@openmrs/esm-styleguide": "^1.3.0",
61-
"i18next": "^19.4.2",
62-
"react": "^16.9.0",
63-
"react-dom": "^16.9.0",
64-
"react-i18next": "^11.3.4",
65-
"rxjs": "^6.6.2",
6683
"@types/yup": "^0.29.3",
6784
"babel-eslint": "^10.0.2",
6885
"babel-jest": "^24.9.0",
6986
"babel-loader": "^8.0.6",
7087
"browserslist-config-openmrs": "^1.0.0",
71-
"carbon-components": "^10.19.0",
72-
"carbon-components-react": "^7.19.0",
73-
"carbon-icons": "^7.0.7",
7488
"clean-webpack-plugin": "^3.0.0",
7589
"concurrently": "^5.0.0",
7690
"css-loader": "^3.2.0",
@@ -81,36 +95,27 @@
8195
"eslint-plugin-prettier": "^3.1.0",
8296
"fork-ts-checker-webpack-plugin": "^1.5.0",
8397
"husky": "^3.0.4",
98+
"i18next": "^19.4.2",
8499
"identity-obj-proxy": "^3.0.0",
85100
"jest": "^24.9.0",
86101
"jest-cli": "^24.9.0",
87102
"kremling": "^2.0.1",
88103
"lodash": "^4.17.19",
104+
"openmrs": "^3.0.2",
89105
"prettier": "^1.18.2",
90106
"pretty-quick": "^1.11.1",
107+
"react": "^16.9.0",
108+
"react-dom": "^16.9.0",
109+
"react-i18next": "^11.3.4",
91110
"react-router": "^5.0.1",
92111
"react-router-dom": "^5.2.0",
112+
"rxjs": "^6.6.2",
93113
"single-spa-react": "^2.10.2",
94114
"style-loader": "^1.0.0",
95115
"systemjs-webpack-interop": "^1.1.0",
96-
"typescript": "^3.5.3",
116+
"typescript": "^4.0.3",
97117
"webpack": "^4.39.2",
98118
"webpack-cli": "^3.3.7",
99119
"webpack-dev-server": "^3.8.0"
100-
},
101-
"peerDependencies": {
102-
"@openmrs/esm-api": "^3.0.0",
103-
"@openmrs/esm-extension-manager": "^0.1.1",
104-
"@openmrs/esm-module-config": "^2.2.0",
105-
"@openmrs/esm-patient-chart-widgets": "^1.0.3",
106-
"@openmrs/esm-styleguide": "^1.3.0",
107-
"i18next": "^19.4.2",
108-
"react": "^16.9.0",
109-
"react-dom": "^16.9.0",
110-
"react-i18next": "^11.3.4",
111-
"rxjs": "^6.6.2"
112-
},
113-
"dependencies": {
114-
"lodash-es": "^4.17.15"
115120
}
116121
}

prettier.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ module.exports = {
66
parser: 'typescript',
77
semi: true,
88
jsxBracketSameLine: true,
9-
includeFiles: 'src/**/*.tsx',
109
};

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { backendDependencies } from './openmrs-backend-dependencies';
2-
import { attach } from '@openmrs/esm-extension-manager';
2+
import { attach } from '@openmrs/esm-extensions';
33

44
const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
55

src/root.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { BrowserRouter, Route, Switch } from 'react-router-dom';
3-
import { defineConfigSchema } from '@openmrs/esm-module-config';
3+
import { defineConfigSchema } from '@openmrs/esm-config';
44
import openmrsRootDecorator from '@openmrs/react-root-decorator';
55
import './root.css';
66
import MedicationsOverview from './widgets/medications/medications-overview.component';

0 commit comments

Comments
 (0)