{"version":"1.0","type":"rich","title":"Handlebars for mocha with browserify","description":"This example demonstrates how to extend JavaScript’s module system to load Handlebars templates directly from `.hbs` files. It shows a custom `require.extensions` handler that reads a template file synchronously and compiles it with `Handlebars.compile`, returning the compiled function as the module export. The code uses the `handlebars` and `fs` Node.js APIs, and pairs with browserify to bundle the helper for client-side use, enabling seamless template inclusion alongside JavaScript modules.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-11183020?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}