Jean-Yves Didier

included 2 more tools

import process from 'node:process';
import * as fs from 'node:fs';
const helpers ={
'-h' : function(){
console.log("usage: node arcsclient.js [-h] ");
process.exit(0);
}
}
/** list of helpers that are needed
* -h: help
* -q: keywords_list
* -i: install library
*
*
*/
\ No newline at end of file
import process from 'node:process';
......@@ -92,15 +92,15 @@ for(const element of files) {
}
}
}
if (libraries[element] === undefined) {
libraries[path.relative(inputDir,element)] = null;
}
} catch (e) {
console.log(`${element} is not a valid component library`);
}
for (let c in cmp) {
console.log(c);
if (components[c] === undefined) {
console.log(
`adding component ${c} from ${cmp[c].library}`
)
components[c] = cmp[c];
} else {
components[c] = [ components[c], cmp[c] ];
......@@ -110,4 +110,4 @@ for(const element of files) {
const result = { components, libraries };
fs.writeFileSync(outputFile, JSON.stringify(result, null, 2));
fs.writeFileSync(path.join(inputDir,outputFile), JSON.stringify(result, null, 2));
......
{ "type" : "module"}
\ No newline at end of file