You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if the option.amd was working similarly as in the grunt-contrib-handlebars (since it's very similar) This would enable users to define the library name right in the template init function..
gruntfile.json
amd: ['my_underscore'],
jst.js
if(typeofoptions.amd==='boolean'){output.unshift("define(function(){");}elseif(typeofoptions.amd==='string'){output.unshift('define([\''+options.amd+'\'], function(_) {');}elseif(Array.isArray(options.amd)){// convert options.amd to a string of dependencies for require([...])varamdString='';for(vari=0;i<options.amd.length;i++){if(i!==0){amdString+=', ';}amdString+='\''+options.amd[i]+'\'';}output.unshift('define(['+amdString+'], function(_) {');}
It would be great if the option.amd was working similarly as in the grunt-contrib-handlebars (since it's very similar) This would enable users to define the library name right in the template init function..
gruntfile.json
jst.js
result:
The text was updated successfully, but these errors were encountered: