{"id":18848,"library":"template-bundler","title":"template-bundler","description":"Templates to TypeScript bundler (v0.1.1). Converts HTML files with script[type='text/template'] into a TypeScript module with a hash of stringified templates. Recursively crawls directories; generates internal modules. Highly specific utility; no active maintenance since 2016. Differentiator: direct TS output without runtime dependencies.","status":"abandoned","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/aroberts-illumina/template-bundler","tags":["javascript","TypeScript","templates","JavaScript"],"install":[{"cmd":"npm install template-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add template-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add template-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The generated output.ts uses internal module syntax (module foo.bar { export var ... }) which is a TypeScript legacy pattern; not ES modules. Use a reference directive or include the file in your compilation.","wrong":"import { Templates } from './output'","symbol":"Templates","correct":"/// <reference path='output.ts' />"},{"note":"Access via the module namespace specified in the CLI command.","wrong":"Templates.foo","symbol":"foo.bar","correct":"foo.bar.Templates[\"foo\"]"}],"quickstart":{"code":"# Given a directory my-templates with Foo.template.html:\n# <script type=\"text/template\" id=\"foo\"><h1>Foo</h1></script>\ntb my-templates output.ts myModule\necho \"Generated output.ts with module myModule { export var Templates = {...} }\"","lang":"typescript","description":"Shows how to run the tb CLI to bundle templates into a TypeScript file with a custom module name."},"warnings":[{"fix":"Provide all three arguments in the correct order: tb <dir> <output> <moduleName>","message":"CLI arguments order is positional: directory, output file, module name. No flags or defaults.","severity":"breaking","affected_versions":">=0.0.1 <=0.1.1"},{"fix":"Use /// <reference path='output.ts' /> or compile with --module amd/commonjs and include the file. Consider using a modern bundler instead.","message":"Generated code uses internal TypeScript modules (module X { export var Y }) which is a deprecated syntax. Cannot be used with ES module imports.","severity":"gotcha","affected_versions":">=0.0.1 <=0.1.1"},{"fix":"Evaluate alternative template bundlers like lit-html or handlebars-loader.","message":"Project is unmaintained since 2016. No updates for TypeScript 2+ or modern workflows.","severity":"deprecated","affected_versions":">=0.0.1 <=0.1.1"},{"fix":"Ensure templates have .template.html extension (recommended) or just .html.","message":"Input HTML files must have .html extension; directory is crawled recursively.","severity":"gotcha","affected_versions":">=0.0.1 <=0.1.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install -g template-bundler and ensure npm global bin is in PATH.","cause":"Package not installed globally or not in PATH.","error":"tb: command not found"},{"fix":"Use /// <reference path='./output.ts' /> in a TypeScript file that uses the module, or include output.ts in your tsconfig.json files list.","cause":"Generated output uses internal module syntax; cannot be imported with ES import.","error":"Cannot find module 'output.ts'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}