awtk/tools/idl_gen/tkc.js
2020-10-13 15:35:29 +08:00

23 lines
570 B
JavaScript

const fs = require('fs');
const path = require('path');
const glob = require('glob')
const IDLGen = require('./idl_gen.js')
let outputIDL = 'tkc.json';
let sourcesPath = path.normalize(path.join(__dirname, '../../src/tkc'));
if(process.argv.length == 3) {
outputIDL = process.argv[2];
} else if(process.argv.length > 3) {
outputIDL = process.argv[2];
sourcesPath = process.argv[3];
}
if(sourcesPath === '-h' || sourcesPath === '--help') {
console.log('Usage: node index.js outputIDL sourcesPath');
process.exit(0);
}
IDLGen.gen(sourcesPath, outputIDL)