P Varga
P Varga

Reputation: 20219

Turning .html templates into AMD modules with grunt-ts

Using grunt-ts with say the html: ["*.tpl.html"] option, it compiles *.tpl.html files in the end into *.tpl.html.js files, which set a global var.

Can I instead tell grunt-ts to output the final .js file in a different module syntax, such as AMD or CommonJS, (to avoid using globals)?

Upvotes: 0

Views: 47

Answers (1)

basarat
basarat

Reputation: 276191

Can I instead tell grunt-ts to output the final .js file in a different module syntax, such as AMD or CommonJS, (to avoid using globals)

Not at the moment. The whole html template mechanism was written before module systems exploded in popularity.

Upvotes: 1

Related Questions