Skip to content

Commit bb1e88a

Browse files
committed
Remove unnecessary function and dependency
1 parent b2f5121 commit bb1e88a

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

tooling/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"dependencies": {
1414
"@jsonforms/core": "^2.0.12-rc.3",
1515
"npm": "^6.4.1",
16-
"npm-cmd": "^0.2.0",
1716
"simple-git": "^1.107.0"
1817
},
1918
"type-check": "tsc",

tooling/src/index.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as jsonforms from '@jsonforms/core';
33
import * as cp from 'child_process';
44
import { writeFile, readFile } from 'fs';
55
var npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
6+
67
/*
78
* Clones a git repository and runs npm install on it
89
* @param {string} repo the name of the repo that should be cloned
@@ -44,24 +45,10 @@ export function generateUISchema(path: string, callback: (result: string, type?:
4445
var content = JSON.parse(data);
4546
var jsonSchema = jsonforms.generateJsonSchema(content);
4647
var jsonUISchema = jsonforms.generateDefaultUISchema(jsonSchema);
47-
callback(JSON.stringify(jsonUISchema));
4848
var newPath = path.substring(0, path.lastIndexOf("/"));
49-
console.log(newPath+'/ui-schema.json');
50-
console.log(JSON.stringify(jsonUISchema,null, 2));
5149
writeFile(newPath+'/ui-schema.json', JSON.stringify(jsonUISchema,null, 2), (err) => {
5250
if (err) callback(err.message, 'err');
5351
callback('Successfully generated UI schema');
5452
});
5553
});
5654
}
57-
58-
/**
59-
* Takes a path and removes the last part
60-
* @param {string} path path to a folder or file
61-
* @return {string} the path without the last part
62-
*/
63-
/* function removeLastPathElement(path: string) {
64-
var newPath = path.split('\\');
65-
newPath.pop();
66-
return newPath.join('\\');
67-
} */

0 commit comments

Comments
 (0)