cmacc-compiler

raw JSON →
2.1.9 verified Fri May 01 auth: no javascript maintenance

cmacc-compiler is a document compiler for the Cmacc format, version 2.1.9. It processes Cmacc files through a pipeline: loading, parsing, assembling, reducing, compiling, and rendering to HTML. Key differentiators: it handles variables, AST generation, and multi-source loading (local or network). Alternatives like Pandoc or custom markdown parsers lack Cmacc-specific features. Release cadence is sporadic; not actively maintained.

error Error: Cannot find module 'remarkably'
cause Remarkably not installed as peer dependency.
fix
npm install remarkably
error TypeError: cmaccCompiler.compile is not a function
cause Using import instead of require with CommonJS package.
fix
Use const cmaccCompiler = require('cmacc-compiler')
error Error: base path must be a string
cause options.base missing or not a string.
fix
Set options.base to a valid directory path.
gotcha Package requires Remarkably as a peer dependency; missing it causes runtime errors.
fix Run npm install remarkably --save
deprecated No updates since 2019; consider forking or alternatives.
fix Use actively maintained doc generators like Pandoc.
gotcha Only CommonJS; ESM imports will fail.
fix Use require() instead of import.
npm install cmacc-compiler
yarn add cmacc-compiler
pnpm add cmacc-compiler

Shows how to compile Cmacc files using require and options object.

const cmaccCompiler = require('cmacc-compiler');
const options = { base: '/path/to/cmacc-dir' };
cmaccCompiler.compile(options).then(result => {
  console.log(result.html);
}).catch(err => console.error(err));