Skip to content
代码片段 群组 项目
提交 60ecf601 编辑于 作者: Timotej Ecimovic's avatar Timotej Ecimovic
浏览文件

Start working on a standalone node.js regen.

Opens a can of works with the whole ES6 vs ES5 mess.
上级 e9fb12b4
No related branches found
No related tags found
无相关合并请求
......@@ -2,6 +2,7 @@
"name": "zap",
"version": "0.99.1",
"description": "Configuration tool for the Zigbee Cluster Library",
"type": "module",
"productName": "zap",
"cordovaId": "",
"capacitorId": "",
......
import path from 'path'
import fs from 'fs'
import {
closeDatabase,
initDatabase,
loadSchema,
} from './src-electron/db/db-api.js'
import {
schemaFile,
sqliteTestFile,
appDirectory,
setDevelopmentEnv,
} from './src-electron/util/env.js'
import { runSdkGeneration } from './src-electron/sdk-gen/sdk-gen.js'
import { loadZcl } from './src-electron/zcl/zcl-loader.js'
import { zclPropertiesFile } from './src-electron/main-process/args.js'
setDevelopmentEnv()
var file = sqliteTestFile(42)
var db
initDatabase(file)
.then((d) => loadSchema(d, schemaFile(), '0.99.0'))
.then((d) => loadZcl(d, zclPropertiesFile))
.then((d) => {
db = d
return runSdkGeneration({
db: db,
generationDir: path.join(appDirectory(), 'sdk-gen'),
templateDir: '',
dontWrite: false,
})
})
.then(() => closeDatabase(db))
.then(() => {
if (fs.existsSync(file)) fs.unlinkSync(file)
})
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册