chore(build): try to build demo and docs (#3434)

This commit is contained in:
Alireza authored and GitHub committed 2023-06-06 13:34:26 -04:00
1 parent 869b8ced05
commit 828690cd3b
329 files changed
+1896 -1010

No files matched your search

+8 -2
View File
@@ -3,6 +3,12 @@ const webpackCommon = require('./../../../.webpack/webpack.base.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
const ENTRY = {
app: `${SRC_DIR}/index.ts`,
};
module.exports = (env, argv) => {
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR, ENTRY });
};
+12 -12
View File
@@ -7,8 +7,12 @@ const ROOT_DIR = path.join(__dirname, './../');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const ENTRY = {
app: `${SRC_DIR}/index.ts`,
};
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR, ENTRY });
return merge(commonConfig, {
stats: {
@@ -24,23 +28,19 @@ module.exports = (env, argv) => {
},
optimization: {
minimize: true,
sideEffects: true,
sideEffects: false,
},
output: {
path: ROOT_DIR,
library: 'ohifCore',
library: 'ohif-core',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [
{
'cornerstone-math': {
commonjs: 'cornerstone-math',
commonjs2: 'cornerstone-math',
amd: 'cornerstone-math',
root: 'cornerstoneMath',
},
},
externals: [
/\b(vtk.js)/,
/\b(dcmjs)/,
/\b(gl-matrix)/,
/^@cornerstonejs/,
],
});
};
+1 -1
View File
@@ -8,6 +8,6 @@ module.exports = {
// rootDir: "../.."
// testMatch: [
// //`<rootDir>/platform/${pack.name}/**/*.spec.js`
// "<rootDir>/platform/viewer/**/*.test.js"
// "<rootDir>/platform/app/**/*.test.js"
// ]
};
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "OHIF Core Team",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"main": "dist/ohif-core.umd.js",
"module": "src/index.ts",
"types": "src/types/index.ts",
"sideEffects": "false",
@@ -38,7 +38,7 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"dicom-parser": "^1.8.21",
"@ohif/ui": "^2.0.0"
"@ohif/ui": "^3.0.0"
},
"dependencies": {
"@babel/runtime": "^7.20.13",