{"id":25186,"library":"dt-compiler","title":"dt-compiler","description":"Δt dynamictemplate Compiler v0.2.1: a static HTML to Δt template compiler that automates separation of design (mockup HTML) and functionality. It compiles HTML masks that templates can use as selectors, ensuring template output matches the mockup structure. Requires dt-parser, dt-selector, and dynamictemplate as peer dependencies. Not actively developed; last release 2012. Differentiator: masks allow designer-driven updates without breaking templates, unlike manual template writing.","status":"abandoned","version":"0.2.1","language":"javascript","source_language":"en","source_url":"git://github.com/dodo/node-dt-compiler","tags":["javascript","dt","compiler","async","dynamic","event","template","generation","stream"],"install":[{"cmd":"npm install dt-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add dt-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add dt-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"parser for dt templates","package":"dt-parser","optional":false},{"reason":"selector for dt templates","package":"dt-selector","optional":false},{"reason":"core template engine","package":"dynamictemplate","optional":false}],"imports":[{"note":"CommonJS only; no ESM support.","symbol":"Compiler","correct":"const { Compiler } = require('dt-compiler')"},{"note":"No default export; use named import or require the module directly.","wrong":"import dtCompiler from 'dt-compiler'","symbol":"(default)","correct":"const dtCompiler = require('dt-compiler')"},{"note":"Instantiate with new; no default export.","wrong":"import { Compiler } from 'dt-compiler'; const compiler = new Compiler() // only works if bundler supports CJS interop","symbol":"compiler instance","correct":"const compiler = new (require('dt-compiler').Compiler)"}],"quickstart":{"code":"const { Compiler } = require('dt-compiler');\n\nconst compiler = new Compiler();\ncompiler.build({\n  src: \"index.html\",\n  dest: \"body.js\",\n  select: function () { return this.select('body', '*') },\n  done: function () { console.log(\"done.\"); process.exit(0); }\n});","lang":"javascript","description":"Compiles a mockup HTML file into a mask JavaScript file for use with dynamictemplate."},"warnings":[{"fix":"Consider alternatives like jsdom or cheerio for HTML transformation.","message":"Package not updated since 2012; no support for modern Node.js or ES modules.","severity":"deprecated","affected_versions":">=0.2.1"},{"fix":"Double-check class names and selectors against the mockup.","message":"Mask matching is fragile: typo in class name causes duplicate content instead of error.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use --legacy-peer-deps or install deps manually.","message":"Requires exact peer dependency versions; install may fail with npm v3+.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use require() or a bundler that supports CJS.","message":"No ESM support; all imports must be CommonJS require().","severity":"breaking","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install dt-parser@>=0.0.1","cause":"Missing peer dependency dt-parser.","error":"Error: Cannot find module 'dt-parser'"},{"fix":"npm install dt-selector@>=0.0.4","cause":"Missing peer dependency dt-selector.","error":"Error: Cannot find module 'dt-selector'"},{"fix":"npm install dynamictemplate@>=0.7.0","cause":"Missing peer dependency dynamictemplate.","error":"Error: Cannot find module 'dynamictemplate'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}