Skip to main content
100%

Get file with macro processed

✓ Published0🌍 Public
Aadamscott
Last edited May 17, 2025
Created on May 17, 2025

This example demonstrates a command-line utility that processes source files with Emscripten macro interpolation, reading an input file and a JSON settings file, then producing a preprocessed output file. It uses Node.js built-in modules like `node:fs`, `node:vm`, and `node:util` for file operations, argument parsing, and context execution. The script imports Emscripten’s `processMacros` and `preprocess` functions to handle macro expansion and outputs the result to the console. The command supports options like `--help`, `--version`, `--verbose`, and `--emscripten-path` to customize behavior.

AI-generated description

Similar vizzes