TmodJS (formerly atc) is a front-end template precompilation tool that compiles HTML templates into JavaScript, enabling synchronous file loading in the browser. It supports artTemplate syntax, template organization by directory, and sub-template inclusion. The current stable version is 1.0.4, released in 2015. The project is abandoned; last update was 2017. Key differentiators: precompilation to eliminate runtime template parsing, optional module output in AMD, CMD, CommonJS, or default format, and file watching for incremental builds. Alternatives like Handlebars or EJS with precompilation offer more active maintenance.
npm install tmodjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs TmodJS, creates a template file, compiles it to a single JS bundle, and uses the template function in an HTML page.
Migrate to actively maintained alternatives like Handlebars, EJS, or Nunjucks with precompilation.
Use `tmod` after installing `tmodjs` globally.
Use `template('news/list', data)` instead of `template('news/list.html', data)`.Use `require('./path/to/template')` without `.html` extension.Use the CLI directly or switch to a modern build tool like Webpack or Vite with a template loader.
Run `npm install -g tmodjs` and verify with `npm list -g tmodjs`.
Ensure the require path matches the output directory and omits file extension. E.g., `require('./tpl/build/news/list')`.Include the script before using `template()`: `<script src="build/template.js"></script>`.
Use TmodJS to precompile templates to JS. Alternatively, use artTemplate's runtime loader but that is deprecated.
No dependency data recorded yet.