Add build subcommand: DSL spec to v2-map JSON file
Reads the DSL file, parses to AST, loads all --atlas-dir paths into a registry, runs the builder, and writes pretty-printed JSON. The output filename's basename becomes the map id when the DSL has no 'id' directive. Parser and builder errors are surfaced as '<file>:<line>: <message>'. Also reorders the duplicate-atlas warning so the atlas_id appears before the word 'duplicate'.
This commit is contained in:
@@ -32,6 +32,7 @@ function run(argv, { out, err }) {
|
||||
const handlers = {
|
||||
encode: require('./commands/encode'),
|
||||
decode: require('./commands/decode'),
|
||||
build: require('./commands/build'),
|
||||
};
|
||||
const handler = handlers[head];
|
||||
if (!handler) {
|
||||
|
||||
Reference in New Issue
Block a user