-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Offline Setup for a variety of patient chart widgets (#246)
* Added .editorconfig and prettier config. * Ran prettier. * Offlineified patient-chart-app and patient-banner-app. * Render form widget when offline. * Format webpack configs. * Offlineified summary extensions of vitals. * Expose vitals overview in result dashboard when offline. * Offlineified biometrics. * formatting * Offlineified notes. * Added offline setup to clinical-view. * Offlineified test-results. * Added offline setup function to allergies widget. * Single dev dependency + offline webpack config for all MFs. * Stats plugin for common-lib. * Revert common lib changes. Fix medications webpack config.
- Loading branch information
1 parent
4c061ab
commit 13b6659
Showing
38 changed files
with
844 additions
and
593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,85 @@ | ||
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); | ||
const { resolve } = require("path"); | ||
const { CleanWebpackPlugin } = require("clean-webpack-plugin"); | ||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
const { resolve } = require('path'); | ||
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | ||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); | ||
const { StatsWriterPlugin } = require('webpack-stats-plugin'); | ||
|
||
const { peerDependencies } = require("./package.json"); | ||
const { peerDependencies } = require('./package.json'); | ||
|
||
const filename = 'openmrs-esm-patient-allergies-app.js'; | ||
const cssLoader = { | ||
loader: "css-loader", | ||
loader: 'css-loader', | ||
options: { | ||
modules: { | ||
localIdentName: | ||
"esm-patient-allergies__[name]__[local]___[hash:base64:5]" | ||
} | ||
} | ||
localIdentName: 'esm-patient-allergies__[name]__[local]___[hash:base64:5]', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = (env, argv = {}) => ({ | ||
entry: [ | ||
resolve(__dirname, "src/set-public-path.ts"), | ||
resolve(__dirname, "src/index.ts") | ||
], | ||
mode: argv.mode || "development", | ||
entry: [resolve(__dirname, 'src/set-public-path.ts'), resolve(__dirname, 'src/index.ts')], | ||
mode: argv.mode || 'development', | ||
output: { | ||
filename: "openmrs-esm-patient-allergies-app.js", | ||
libraryTarget: "system", | ||
path: resolve(__dirname, "dist"), | ||
jsonpFunction: "webpackJsonp_openmrs_esm_patient_allergies_app" | ||
filename, | ||
libraryTarget: 'system', | ||
path: resolve(__dirname, 'dist'), | ||
jsonpFunction: 'webpackJsonp_openmrs_esm_patient_allergies_app', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
parser: { | ||
system: false | ||
} | ||
system: false, | ||
}, | ||
}, | ||
{ | ||
test: /\.m?(js|ts|tsx)$/, | ||
exclude: /(node_modules|bower_components)/, | ||
use: { | ||
loader: "babel-loader" | ||
} | ||
loader: 'babel-loader', | ||
}, | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ["style-loader", cssLoader] | ||
use: ['style-loader', cssLoader], | ||
}, | ||
{ | ||
test: /\.s[ac]ss$/i, | ||
use: ["style-loader", cssLoader, "sass-loader"] | ||
use: ['style-loader', cssLoader, 'sass-loader'], | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif)$/i, | ||
use: [ | ||
{ | ||
loader: "file-loader" | ||
} | ||
] | ||
} | ||
] | ||
loader: 'file-loader', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
devtool: "sourcemap", | ||
devtool: 'sourcemap', | ||
devServer: { | ||
headers: { | ||
"Access-Control-Allow-Origin": "*" | ||
'Access-Control-Allow-Origin': '*', | ||
}, | ||
disableHostCheck: true | ||
disableHostCheck: true, | ||
}, | ||
externals: Object.keys(peerDependencies), | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin(), | ||
new CleanWebpackPlugin(), | ||
new BundleAnalyzerPlugin({ | ||
analyzerMode: env && env.analyze ? "server" : "disabled" | ||
}) | ||
analyzerMode: env && env.analyze ? 'server' : 'disabled', | ||
}), | ||
new StatsWriterPlugin({ | ||
filename: `${filename}.buildmanifest.json`, | ||
stats: { | ||
all: false, | ||
chunks: true, | ||
}, | ||
}), | ||
], | ||
resolve: { | ||
extensions: [".tsx", ".ts", ".jsx", ".js"] | ||
} | ||
extensions: ['.tsx', '.ts', '.jsx', '.js'], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,85 @@ | ||
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); | ||
const { resolve } = require("path"); | ||
const { CleanWebpackPlugin } = require("clean-webpack-plugin"); | ||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
const { resolve } = require('path'); | ||
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | ||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); | ||
const { StatsWriterPlugin } = require('webpack-stats-plugin'); | ||
|
||
const { peerDependencies } = require("./package.json"); | ||
const { peerDependencies } = require('./package.json'); | ||
|
||
const filename = 'openmrs-esm-patient-appointments-app.js'; | ||
const cssLoader = { | ||
loader: "css-loader", | ||
loader: 'css-loader', | ||
options: { | ||
modules: { | ||
localIdentName: | ||
"esm-patient-appointments__[name]__[local]___[hash:base64:5]" | ||
} | ||
} | ||
localIdentName: 'esm-patient-appointments__[name]__[local]___[hash:base64:5]', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = (env, argv = {}) => ({ | ||
entry: [ | ||
resolve(__dirname, "src/set-public-path.ts"), | ||
resolve(__dirname, "src/index.ts") | ||
], | ||
mode: argv.mode || "development", | ||
entry: [resolve(__dirname, 'src/set-public-path.ts'), resolve(__dirname, 'src/index.ts')], | ||
mode: argv.mode || 'development', | ||
output: { | ||
filename: "openmrs-esm-patient-appointments-app.js", | ||
libraryTarget: "system", | ||
path: resolve(__dirname, "dist"), | ||
jsonpFunction: "webpackJsonp_openmrs_esm_patient_appointments_app" | ||
filename, | ||
libraryTarget: 'system', | ||
path: resolve(__dirname, 'dist'), | ||
jsonpFunction: 'webpackJsonp_openmrs_esm_patient_appointments_app', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
parser: { | ||
system: false | ||
} | ||
system: false, | ||
}, | ||
}, | ||
{ | ||
test: /\.m?(js|ts|tsx)$/, | ||
exclude: /(node_modules|bower_components)/, | ||
use: { | ||
loader: "babel-loader" | ||
} | ||
loader: 'babel-loader', | ||
}, | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ["style-loader", cssLoader] | ||
use: ['style-loader', cssLoader], | ||
}, | ||
{ | ||
test: /\.s[ac]ss$/i, | ||
use: ["style-loader", cssLoader, "sass-loader"] | ||
use: ['style-loader', cssLoader, 'sass-loader'], | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif)$/i, | ||
use: [ | ||
{ | ||
loader: "file-loader" | ||
} | ||
] | ||
} | ||
] | ||
loader: 'file-loader', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
devtool: "sourcemap", | ||
devtool: 'sourcemap', | ||
devServer: { | ||
headers: { | ||
"Access-Control-Allow-Origin": "*" | ||
'Access-Control-Allow-Origin': '*', | ||
}, | ||
disableHostCheck: true | ||
disableHostCheck: true, | ||
}, | ||
externals: Object.keys(peerDependencies), | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin(), | ||
new CleanWebpackPlugin(), | ||
new BundleAnalyzerPlugin({ | ||
analyzerMode: env && env.analyze ? "server" : "disabled" | ||
}) | ||
analyzerMode: env && env.analyze ? 'server' : 'disabled', | ||
}), | ||
new StatsWriterPlugin({ | ||
filename: `${filename}.buildmanifest.json`, | ||
stats: { | ||
all: false, | ||
chunks: true, | ||
}, | ||
}), | ||
], | ||
resolve: { | ||
extensions: [".tsx", ".ts", ".jsx", ".js"] | ||
} | ||
extensions: ['.tsx', '.ts', '.jsx', '.js'], | ||
}, | ||
}); |
Oops, something went wrong.