File size: 512 Bytes
31c7d49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { mkdir, copyFile } from 'node:fs/promises'
import { resolve } from 'node:path'

const root = process.cwd()
const srcDir = resolve(root, 'node_modules/onnxruntime-web/dist')
const dstDir = resolve(root, 'public/ort')

const files = [
  'ort-wasm-simd-threaded.asyncify.mjs',
  'ort-wasm-simd-threaded.asyncify.wasm',
]

await mkdir(dstDir, { recursive: true })
for (const file of files) {
  await copyFile(resolve(srcDir, file), resolve(dstDir, file))
}

console.log(`Copied ORT web assets to ${dstDir}`)