mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-04 21:17:50 +08:00
23 lines
570 B
JavaScript
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)
|
|||
|
|