Publish npm package with node-addon-api for Windows (#838)

This commit is contained in:
Fangjun Kuang
2024-05-06 16:21:29 +08:00
committed by GitHub
parent e1bb928805
commit 37a4135dd7
15 changed files with 282 additions and 75 deletions

View File

@@ -1,5 +1,9 @@
const os = require('os');
const platform_arch = `${os.platform()}-${os.arch()}`;
// Package name triggered spam for sherpa-onnx-win32-x64
// so we have renamed it to sherpa-onnx-win-x64
const platform_arch =
`${os.platform() == 'win32' ? 'win' : os.platform()}-${os.arch()}`;
const possible_paths = [
'../build/Release/sherpa-onnx.node',
'../build/Debug/sherpa-onnx.node',