Node Kit
raw JSON → 0.11.0 verified Fri May 01 auth: no javascript maintenance
Node-based compiler for .kit template files (CodeKit format). Version 0.11.0, last updated in 2018. Low maintenance cadence. Supports variables, includes, and preprocessing for HTML templates. Differentiator: replicates CodeKit's .kit workflow in Node.js, enabling server-side or build-time compilation without the GUI.
Common errors
error Error: Cannot find module 'node-kit' ↓
cause Package not installed or not in node_modules.
fix
Run
npm install node-kit in your project directory. error TypeError: kit is not a function ↓
cause Incorrect import style; default import not used properly.
fix
Use
import kit from 'node-kit' or const kit = require('node-kit') for CommonJS. Warnings
gotcha Default export is not a function in all versions? Verify. ↓
fix Use named exports or ensure correct import style.
deprecated Package has not been updated since 2018, may contain unpatched vulnerabilities. ↓
fix Consider alternatives or pin to known safe version.
gotcha Only works with .kit files; not compatible with other template formats. ↓
fix Ensure input files have .kit extension.
Install
npm install node-kit yarn add node-kit pnpm add node-kit Imports
- kit wrong
const kit = require('node-kit')correctimport kit from 'node-kit' - compile wrong
const compile = require('node-kit/compile')correctimport { compile } from 'node-kit' - compileFile wrong
const compileFile = require('node-kit').compileFilecorrectimport { compileFile } from 'node-kit'
Quickstart
import kit from 'node-kit';
const html = kit('path/to/template.kit');
console.log(html);