in src/generator.js [161:183]
constructor(meta = {}, lang = 'swift') {
if (!meta.outputDir) {
throw new Error('`option.outputDir` should not empty');
}
this.lang = lang;
const langDir = path.join(__dirname, `./langs/${lang}/`);
if (!fs.existsSync(langDir)) {
throw new Error(`Not supported language : ${lang}`);
}
const lang_config = require(`./langs/${lang}/config`);
const common_config = _deepClone(require('./langs/common/config'));
const config = {
dir: meta.outputDir,
};
const meta_lang_config = !meta[lang] ? {} : meta[lang];
this.config = _assignObject(
config,
common_config,
lang_config,
meta,
meta_lang_config
);
}