Flave (Full Logic Access View Engine) is a Razor-like view transpiler for JavaScript that compiles template files into plain JavaScript functions returning strings. Version 1.5.3 is the current stable release, with irregular cadence. Unlike many templating engines that restrict logic, Flave gives full access to JavaScript via code blocks and expressions. It is isomorphic (no DOM required), supports custom configuration for quoting, whitespace, and exports, and integrates with editors like VSCode and Atom through community extensions.
npm install flaveNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to load a .flave file, transpile it using configuration options, and output the resulting JavaScript code.
Set the `output` config option to a unique variable name, e.g., `output: '__html'`.
Set `export: false` in config when targeting browser environments.
Set `format: false` in config to get unformatted but consistent JavaScript.
Set `stripcomments: false` to preserve comments.
Use `const flave = require('flave');` with correct path.Ensure you import the module correctly: `const flave = require('flave');` then call `flave.transpile()`.Wrap your view/function definitions in a class if you want namespacing, but ensure the syntax follows Flave rules: `class name { view viewname { } }`.No dependency data recorded yet.