Skip to content

Commit

Permalink
fix(itk-dicom): build issues for the new package
Browse files Browse the repository at this point in the history
  • Loading branch information
jadh4v committed Feb 8, 2023
1 parent bea6441 commit 46ef37f
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 234 deletions.
179 changes: 0 additions & 179 deletions packages/dicom/typescript/dist/demo/app.js

This file was deleted.

7 changes: 3 additions & 4 deletions packages/dicom/typescript/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
flex-wrap: wrap;
}
</style>
<script src="./dist/demo/xstate.js"></script>
<script src="./dist/demo/spectrum.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/spectrum.min.js"></script>
<!-- <script type="module" async src="./dist/demo/spectrum.js"></script> -->
</head>

Expand Down Expand Up @@ -77,7 +76,7 @@
</section>
</sp-theme>

<script type="module" src="./dist/itk-dicom.js"></script>
<script type="module" src="./dist/demo/app.js"></script>
<script type="module" src="./dist/bundles/itk-dicom.js"></script>
<script type="module" src="./test/browser/app.ts"></script>
</body>
</html>
40 changes: 21 additions & 19 deletions packages/dicom/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@
"version": "0.2.0",
"description": "DICOM IO from itk-wasm",
"type": "module",
"module": "./dist/itk-dicom.js",
"module": "./dist/bundles/itk-dicom.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"browser": "./dist/itk-dicom.js",
"browser": "./dist/bundles/itk-dicom.js",
"node": "./dist/itk-dicom.node.js",
"umd": "./dist/itk-dicom.umd.js",
"default": "./dist/itk-dicom.js"
"default": "./dist/bundles/itk-dicom.js"
}
},
"scripts": {
"dev": "vite --port 8173",
"build": "npm run build:spectrum && npm run build:browser && npm run build:node",
"build:node": "rollup -c ./rollup.node.config.js",
"build:spectrum": "rollup -c ./rollup.spectrum.config.js",
"build:browser": "tsc && vite build --sourcemap",
"build:browser:watch": "tsc && vite build --minify false --mode development --watch",
"build": "npm run build:tsc && npm run build:node && npm run build:browser && npm run build:demo",
"build:node": "rollup -c ./build/rollup.node.config.js",
"build:browser": "rollup -c ./build/rollup.browser.config.js",
"build:tsc": "tsc --pretty",
"build:demo": "vite -c build/vite.config.js build",
"cypress:open": "npx cypress open",
"cypress:run": "npx cypress run",
"cypress:runChrome": "npx cypress run --browser chrome",
Expand All @@ -45,13 +44,14 @@
},
"homepage": "https://wasm.itk.org",
"dependencies": {
"itk-wasm": "^1.0.0-b.53"
"itk-wasm": "^1.0.0-b.62"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^14.0.1",
"@rollup/plugin-typescript": "^8.5.0",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.3.0",
"@rollup/plugin-typescript": "^10.0.1",
"@spectrum-web-components/checkbox": "^0.14.0",
"@spectrum-web-components/dropzone": "^0.10.0",
"@spectrum-web-components/field-group": "^0.7.0",
Expand All @@ -62,13 +62,15 @@
"@spectrum-web-components/theme": "^0.14.1",
"ava": "^4.3.3",
"cypress": "^10.7.0",
"rollup": "^2.79.0",
"rollup": "^3.9.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-styles": "^4.0.0",
"rollup-plugin-visualizer": "^5.8.1",
"rollup-plugin-ignore": "^1.0.10",
"rollup-plugin-polyfill-node": "^0.11.0",
"start-server-and-test": "^1.14.0",
"typescript": "^4.7.4",
"vite": "^3.0.9",
"xstate": "^4.33.5"
"typescript": "^4.9.4",
"vite": "^4.0.0",
"vite-plugin-static-copy": "^0.13.0",
"xstate": "^4.35.2"
}
}
1 change: 0 additions & 1 deletion packages/dicom/typescript/src/pipeline-worker-url.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-expect-error error TS2732: Cannot find module '../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
import packageJson from '../package.json'
let pipelineWorkerUrl: string | URL | null = `https://cdn.jsdelivr.net/npm/itk-dicom@${packageJson.version as string}/dist/web-workers/pipeline.worker.js`

Expand Down
1 change: 0 additions & 1 deletion packages/dicom/typescript/src/pipelines-base-url.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-expect-error error TS2732: Cannot find module '../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
import packageJson from '../package.json'
let pipelinesBaseUrl: string | URL = `https://cdn.jsdelivr.net/npm/itk-dicom@${packageJson.version as string}/dist/pipelines`

Expand Down
Loading

0 comments on commit 46ef37f

Please sign in to comment.