Remove the unused scripts section of package.json and make user-config-json-to-bin.ts slightly simpler.

This commit is contained in:
László Monda
2017-11-04 17:45:26 +01:00
parent 3313fad9e6
commit a5c478d51c
2 changed files with 1 additions and 8 deletions

View File

@@ -4,12 +4,6 @@
"description": "Agent USB scripts", "description": "Agent USB scripts",
"main": "uhk.js", "main": "uhk.js",
"license": "GPL-3.0", "license": "GPL-3.0",
"scripts": {
"build": "npm run chmod",
"tsc": "tsc",
"chmod": "shx chmod u+x ./*.ts",
"watch": "tsc -w"
},
"devDependencies": { "devDependencies": {
"@types/node": "8.0.28", "@types/node": "8.0.28",
"shx": "0.2.2", "shx": "0.2.2",

View File

@@ -3,10 +3,9 @@
import { UhkBuffer, UserConfiguration } from 'uhk-common'; import { UhkBuffer, UserConfiguration } from 'uhk-common';
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path';
const outputFile = process.argv[2]; const outputFile = process.argv[2];
const inputFile = path.join(__dirname, '/../uhk-web/src/app/services/user-config.json'); const inputFile = `${__dirname}/../uhk-web/src/app/services/user-config.json`;
const config1Js = JSON.parse(fs.readFileSync(inputFile).toString()); const config1Js = JSON.parse(fs.readFileSync(inputFile).toString());
const config1Ts: UserConfiguration = new UserConfiguration().fromJsonObject(config1Js); const config1Ts: UserConfiguration = new UserConfiguration().fromJsonObject(config1Js);
const config1Buffer = new UhkBuffer(); const config1Buffer = new UhkBuffer();