mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
23 lines
566 B
JavaScript
23 lines
566 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const glob = require('glob')
|
|
const IDLGen = require('./idl_gen.js')
|
|
|
|
let outputIDL = 'idl.json';
|
|
let sourcesPath = path.normalize(path.join(__dirname, '../../src'));
|
|
|
|
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)
|
|
|