Revert "Added license exporter (to json)"
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit 84a0bd2cd90509eb843d3f7db569f0a96685acc2.
This commit is contained in:
parent
6c7b31d76c
commit
5cfd2c9a52
@ -1,34 +0,0 @@
|
|||||||
var checker = require('license-checker');
|
|
||||||
var consola = require('consola');
|
|
||||||
var fs = require('fs');
|
|
||||||
|
|
||||||
|
|
||||||
checker.init({
|
|
||||||
start: './',
|
|
||||||
}, function(err, packages) {
|
|
||||||
if (err) {
|
|
||||||
consola.error("Couldn't load the licenses.")
|
|
||||||
} else {
|
|
||||||
let licenses = new Array();
|
|
||||||
Object.keys(packages).forEach(function(key) {
|
|
||||||
licenses.push({
|
|
||||||
"name": packages[key].name,
|
|
||||||
"licenses": packages[key].licenses || null,
|
|
||||||
"repository": packages[key].repository || null,
|
|
||||||
"publisher": packages[key].publisher || null,
|
|
||||||
"email": packages[key].email || null,
|
|
||||||
"version": packages[key].version || null,
|
|
||||||
"description": packages[key].description || null,
|
|
||||||
"copyright": packages[key].copyright || null,
|
|
||||||
"url": packages[key].url || null,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
fs.writeFileSync("./licenses.json", JSON.stringify(licenses), { encoding: "utf-8" });
|
|
||||||
consola.success("Exported licenses to ./licenses.json");
|
|
||||||
} catch (error) {
|
|
||||||
consola.error("Couldn't export the licenses");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
@ -59,7 +59,6 @@
|
|||||||
"cp-cli": "^2.0.0",
|
"cp-cli": "^2.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"nodemon": "^2.0.6",
|
"nodemon": "^2.0.6",
|
||||||
"license-checker": "^25.0.1",
|
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^2.7.1",
|
||||||
"start-server-and-test": "^1.11.6",
|
"start-server-and-test": "^1.11.6",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-jest": "^26.4.4",
|
||||||
@ -75,8 +74,7 @@
|
|||||||
"test:watch": "jest --watchAll",
|
"test:watch": "jest --watchAll",
|
||||||
"test:ci": "start-server-and-test dev http://localhost:4010/api/docs/openapi.json test",
|
"test:ci": "start-server-and-test dev http://localhost:4010/api/docs/openapi.json test",
|
||||||
"seed": "ts-node ./node_modules/typeorm/cli.js schema:sync && ts-node ./node_modules/typeorm-seeding/dist/cli.js seed",
|
"seed": "ts-node ./node_modules/typeorm/cli.js schema:sync && ts-node ./node_modules/typeorm-seeding/dist/cli.js seed",
|
||||||
"openapi:export": "ts-node src/openapi_export.ts",
|
"openapi:export": "ts-node src/openapi_export.ts"
|
||||||
"licenses:export": "node license_exporter.js"
|
|
||||||
},
|
},
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user