A template compiler for ZFML (WeChat WXML-like syntax) that compiles .wxml files into JavaScript render functions. Version 1.0.6 is the latest stable release, with no clear release cadence. It mimics the behavior of wcc.exe/wcc used in WeChat Mini Programs. Key differentiators: lightweight, Node.js-based alternative to the official wcc compiler, focused on transforming WXML templates for WeChat ecosystem development. Maintained as a single-function library with minimal dependencies.
npm install zfml-transpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates CommonJS require, importing the compiler, and calling wxmlCompile with an array of absolute .wxml file paths.
Use path.resolve() or absolute paths for each .wxml file in the fileList array.
Update code to handle an object with a 'js' property instead of a raw string.
Replace compiler.compile() with compiler.wxmlCompile().
Use path.resolve(__dirname, './relative/path/to/file.wxml') to convert to absolute path.
Use require('zfml-transpiler') or require('zfml-transpiler').wxmlCompile.Wrap the file path in an array: wxmlCompile(['file.wxml']) or pass an array of paths.
No dependency data recorded yet.