@stechquick/quick-host-compiler
v0.0.4
Published
Quick qjson compiler library
Readme
quick-host-compiler
packages/quick-host-compiler is currently packaged as a Node library. The public package surface exports runCompileCommand together with the related option and report types.
Example:
import { runCompileCommand } from "@stechquick/quick-host-compiler";
const report = JSON.parse(await runCompileCommand("sampleQjsons/a.qjson", {
emit: true,
destination: "./compiledFiles",
verbose: true,
}));Behavior:
runCompileCommand(source, options)accepts either a.qjsonfile path or a folder path.- Folder compilation walks subfolders recursively and compiles every
.qjsonfile it finds. emitwrites compiled output files.destinationchooses the output folder and is valid only together withemit.- If
emitis enabled withoutdestination, output is written undercompiledFilesin the current working directory. stacktraceincludes stack traces in reported runtime and compile errors when available.verboseprints resolved arguments/options, folder inspection progress, discovered qjson files, and per-file compilation activity.- The command runner returns the final report as a serialized JSON string.
Build:
npm run check:build -w packages/quick-host-compilerruns the typecheck-oriented build validation.npm run build -w packages/quick-host-compilerproduces runtime JavaScript plus declaration files.npm pack -w packages/quick-host-compilerpackages the built output fromdist/for distribution.
TypeScript flows:
tsconfig.runtime.jsonemits the runtime Node output underdist/and explicitly includes../../common/shrimp/omniScriptCompiler/Parser.jsso the generated package keeps the required runtime file.tsconfig.build.jsonemits only.d.tsfiles for consumers.
Package output:
- Runtime entry:
dist/packages/quick-host-compiler/src/index.js - Types entry:
dist/packages/quick-host-compiler/src/index.d.ts package.jsonexports only the root module entry.
Standalone test:
- Run
npm run build -w packages/quick-host-compilerfirst sodist/contains the test entrypoint. cd packages/quick-host-compiler && npm run test ./sampleQjsons/a.qjsonruns the standalone test script.npm run test <path>accepts either a.qjsonfile path or a folder path. The test script runs the compile command and prints the serialized JSON report.
