8000 fix: fix loading todoctor from modules · azat-io/todoctor@846cba0 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 846cba0

Browse files
committed
fix: fix loading todoctor from modules
1 parent 735e1bd commit 846cba0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/create-packages.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ await Promise.all(
2626
let name = `@todoctor/${platform}-${arch}`
2727< 8000 /td>
let displayName = platform.toUpperCase() + platform.slice(1)
2828
let displayArch = arch.toUpperCase()
29+
let packageBinaryFile = 'todoctor'
30+
31+
if (platform === 'win32') {
32+
packageBinaryFile += '.exe'
33+
}
2934

3035
fs.writeFile(
3136
path.join(packageDirectory, 'package.json'),
@@ -39,6 +44,11 @@ await Promise.all(
3944
repository: rootPackageJson.repository,
4045
license: rootPackageJson.license,
4146
author: rootPackageJson.author,
47+
exports: {
48+
'.': {
49+
default: `./${packageBinaryFile}`,
50+
},
51+
},
4252
os: [platform.name],
4353
cpu: [arch],
4454
},

0 commit comments

Comments
 (0)
0