work on new engine
This commit is contained in:
parent
44476da13f
commit
a1e5a21847
126 changed files with 3425 additions and 6695 deletions
21
apps/stock/engine/index.js
Normal file
21
apps/stock/engine/index.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
const { existsSync } = require('fs')
|
||||
const { join } = require('path')
|
||||
|
||||
let nativeBinding = null
|
||||
|
||||
// Try to load the native binding
|
||||
try {
|
||||
if (existsSync(join(__dirname, 'index.node'))) {
|
||||
nativeBinding = require('./index.node')
|
||||
} else {
|
||||
throw new Error('index.node not found')
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(`Failed to load native binding: ${e.message}`)
|
||||
}
|
||||
|
||||
// Export all bindings
|
||||
module.exports = nativeBinding
|
||||
Loading…
Add table
Add a link
Reference in a new issue