UNPKG

uts2puerts

Version:

A tool to convert uts project to puerts project.

16 lines (15 loc) 557 B
import { Convertor } from "./Convertor.js"; import { program } from 'commander'; const rmQuotes = (val) => { const rst = val.match(/(['"])(.+)\1/); if (rst != null) return rst[2]; return val; }; program.option('-p, --projectRoot <path>', '[MUST] the unity project root', rmQuotes); program.option('-r, --ruleFile <path>', 'the replace rule file', rmQuotes) .parse(process.argv); const opts = program.opts(); console.log('options:', opts); const cvt = new Convertor(); await cvt.start(opts.projectRoot, opts.ruleFile);