cli: darwin universal support in js-binding-template.ts
This commit is contained in:
parent
b8bb2e5e4a
commit
2afdfe7aee
1 changed files with 9 additions and 0 deletions
|
@ -105,6 +105,15 @@ switch (platform) {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
|
localFileExisted = existsSync(join(__dirname, '${localName}.darwin-universal.node'))
|
||||||
|
try {
|
||||||
|
if (localFileExisted) {
|
||||||
|
nativeBinding = require('./${localName}.darwin-universal.node')
|
||||||
|
} else {
|
||||||
|
nativeBinding = require('${pkgName}-darwin-universal')
|
||||||
|
}
|
||||||
|
break
|
||||||
|
} catch {}
|
||||||
switch (arch) {
|
switch (arch) {
|
||||||
case 'x64':
|
case 'x64':
|
||||||
localFileExisted = existsSync(join(__dirname, '${localName}.darwin-x64.node'))
|
localFileExisted = existsSync(join(__dirname, '${localName}.darwin-x64.node'))
|
||||||
|
|
Loading…
Reference in a new issue