fix(usb): user-config-json-to-bin compile
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { UhkBuffer, UserConfiguration } from '../uhk-common/src/config-serializer/index';
|
||||
import { UhkBuffer, UserConfiguration } from 'uhk-common';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const inputFile = process.argv[2];
|
||||
console.log(inputFile);
|
||||
const outputFile = process.argv[3];
|
||||
|
||||
const config1Js = JSON.parse(fs.readFileSync(inputFile));
|
||||
const config1Js = JSON.parse(fs.readFileSync(inputFile).toString());
|
||||
const config1Ts: UserConfiguration = new UserConfiguration().fromJsonObject(config1Js);
|
||||
const config1Buffer = new UhkBuffer();
|
||||
config1Ts.toBinary(config1Buffer);
|
||||
|
||||
Reference in New Issue
Block a user