Skip to content
This repository was archived by the owner on Jun 4, 2021. It is now read-only.

Commit bc49762

Browse files
committed
move index file
1 parent d31117e commit bc49762

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const os = require('os');
2-
3-
const onnxjs = require('onnxjs');
1+
import * as os from 'os';
2+
import * as onnxjs from 'onnxjs';
43

54
// check if Node.js
65
if (typeof process !== 'undefined' && process && process.release && process.release.name === 'node') {
@@ -19,14 +18,8 @@ if (typeof process !== 'undefined' && process && process.release && process.rele
1918
throw new Error(`onnxruntime node binding does not support non little-endian platform`);
2019
}
2120

22-
onnxjs.InferenceSession = require('./lib/inference-session-override').OnnxRuntimeInferenceSession;
21+
// force re-assign overwritten property 'InferenceSession'
22+
(onnxjs as any).InferenceSession = require('./inference-session-override').OnnxRuntimeInferenceSession;
2323
}
2424

25-
// Work items for future:
26-
//
27-
// 0 - fix memory leak for inference result (output OrtValue) - DONE
28-
// 1 - support other tensor types (currently only support float32) - DONE
29-
// 2 - typescript type declaration - DONE
30-
// 3 - integration with ONNX.js - DONE
31-
// 4 - refine API (a javascript wrapper on native module) - DONE
32-
// 5 - publish npm module
25+
export = onnxjs;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "",
44
"version": "0.0.1",
55
"author": "fs-eire",
6-
"main": "index.js",
6+
"main": "./lib/index.js",
77
"scripts": {
88
"install": "node-pre-gyp install --fallback-to-build=false || npm run build",
99
"build": "tsc && node ./scripts/build",

0 commit comments

Comments
 (0)