utc is a CLI tool that compiles Underscore.js-style templates into AMD-compatible JavaScript functions. Version 0.1.0 (released 2012) is the only release. It precompiles templates to avoid runtime parsing, suitable for build-time optimization. No active maintenance or updates exist. The tool converts template strings containing <%= ... %> into compiled functions that use with() and concatenated output.
npm install utcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows installation, creating a template file, and compiling it with utc CLI to convert Underscore templates into precompiled functions.
Use modern alternatives like Lodash _.template, handlebars precompilation, or EJS.
Copy templates to a build directory first, or use a different build tool that outputs to a separate folder.
Write templates in AMD format or use a wrapper script to convert output.
Use a template engine that avoids with(), like Lodash (with option) or Handlebars.
Wrap in a shell script or npm script to avoid repeated typing.
Use the global command utc, e.g., from terminal: utc -d ./templates -s Template -f Str
Ensure directory exists and file suffix matches: e.g., -s Template looks for *Template.js files.
Template must be a function that returns an object with methods containing Underscore template strings.
No dependency data recorded yet.