refactor: consume external road compiler

This commit is contained in:
2026-08-26 09:23:46 +08:00
parent b78cb6e990
commit 5cde08090e
48 changed files with 257 additions and 15626 deletions

View File

@@ -4,14 +4,14 @@
const path = require("path");
const { readAreaConfig } = require("./lib/area-config");
const { compileArea, parseArgs } = require("./compile-native-roads");
const { checkOutput } = require("../packages/road-compiler/src/check");
const { check } = require("@osm-asset/road-compiler");
const repoRoot = path.resolve(__dirname, "..");
function checkArea(configPath, options = {}) {
if (options.compile) compileArea(configPath);
const area = readAreaConfig(configPath, { repoRoot });
return checkOutput({ areaId: area.id, outDir: area.outputs.nativeRoadDir });
return check.checkOutput({ areaId: area.id, outDir: area.outputs.nativeRoadDir });
}
function main() {