Skip to content

Commit

Permalink
ENH: Download app sample data during build
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Jul 27, 2023
1 parent 4638272 commit d0e19cd
Show file tree
Hide file tree
Showing 4 changed files with 523 additions and 32 deletions.
8 changes: 6 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import '@shoelace-style/shoelace/dist/components/popup/popup.js';
import '@shoelace-style/shoelace/dist/components/option/option.js';
import '@shoelace-style/shoelace/dist/components/select/select.js';
import '@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js';

import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path';
setBasePath('/');
Expand Down Expand Up @@ -76,9 +77,12 @@ <h2>ITK IO Scanco</h2>
</sl-select>
<br />
<sl-divider></sl-divider>
<br /><sl-button name="loadSampleInputs" variant="default" style="display: none;">Load sample inputs</sl-button>
<sl-button type="button" variant="success" name="run">Run</sl-button><br /><br />
<br /><sl-button name="loadSampleInputs" variant="default" style="display: none;">Load sample inputs</sl-button>
<sl-button type="button" variant="success" name="run">Run</sl-button>
<br />
<sl-progress-bar name="progress-bar" label="Progress" value="0" max="100" style="display: none;"></sl-progress-bar>

<br />
</form></div>
<sl-divider></sl-divider>

Expand Down
6 changes: 4 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"version": "0.1.0",
"description": "Convert and calibrate Scanco microCT volume .isq and .aim files.",
"scripts": {
"start": "npm run copyShoelaceAssets && vite -c vite.config.js",
"start": "npm run copyShoelaceAssets && npm run downloadSampleData && vite -c vite.config.js",
"test": "echo \"tests are not configured\" && exit 1",
"downloadSampleData": "dam download -v public/sample-data public/sample-data.tar.gz bafybeiepwh5ppaeaja7q6kqc25tvzfpkygqomxzqq4csnjfntoxarqtdiq https://w3s.link/ipfs/bafybeihiuinvftya2jqrr7fhdrdf4a5zhx7gnmawwf45mid7j2s5zcn6xi",
"copyShoelaceAssets": "shx mkdir -p public/shoelace && shx cp -r node_modules/@shoelace-style/shoelace/dist/assets public/",
"build": "npm run copyShoelaceAssets && vite -c vite.config.js build"
"build": "npm run copyShoelaceAssets && npm run downloadSampleData && vite -c vite.config.js build"
},
"keywords": [
"itk",
Expand All @@ -25,6 +26,7 @@
"itk-wasm": "1.0.0-b.119"
},
"devDependencies": {
"@itk-wasm/dam": "^1.0.1",
"@shoelace-style/shoelace": "^2.5.2",
"@types/node": "^20.2.5",
"shx": "^0.3.4",
Expand Down
Loading

0 comments on commit d0e19cd

Please sign in to comment.