Skip to content

Commit

Permalink
fix: fix loading todoctor from modules
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Jan 27, 2025
1 parent 735e1bd commit 846cba0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/create-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ await Promise.all(
let name = `@todoctor/${platform}-${arch}`
let displayName = platform.toUpperCase() + platform.slice(1)
let displayArch = arch.toUpperCase()
let packageBinaryFile = 'todoctor'

if (platform === 'win32') {
packageBinaryFile += '.exe'
}

fs.writeFile(
path.join(packageDirectory, 'package.json'),
Expand All @@ -39,6 +44,11 @@ await Promise.all(
repository: rootPackageJson.repository,
license: rootPackageJson.license,
author: rootPackageJson.author,
exports: {
'.': {
default: `./${packageBinaryFile}`,
},
},
os: [platform.name],
cpu: [arch],
},
Expand Down

0 comments on commit 846cba0

Please sign in to comment.