Ignoring Yeoman template tags?

Hi all,

I'm working on developing a Yeoman generator. This involves several template files with varying base languages (HTML/JS/CSS), all of which contain multiple Yeoman template tags which are of the form:

<% //Javascript code here %>

Predictably, these template tags blow up code inspection/highlighting/etc.

I'm aware from the issue tracker that Yeoman is not supported by WebStorm yet, which is understandable. But I'm wondering if there is at least a way to tell Webstorm to just *ignore* anything between "<%" and "%>" for this project so that it doesn't kill my code highlighting and inspection. Otherwise, it's very hard to work on any of the template files due to all the distracting warnings.

I've messed around a bit with trying to set the "template data language" but to no avail. Any help would be greatly appreciated. Thanks!


Comment actions Permalink

There is no way to do this. You can try assigning your HTML/JS/CSS files with embedded yeoman templates to EJS file type (Settings/File Types/EJS combines data and a template to produce HTML) to see if it makes things any better...

Comment actions Permalink

You can create a temp file and associate FileType of Handlebars/Mustache, when you're done copy and paste the content of the temp  to original file and remove the temp. The IDE will recognize all syntax, and is not intrusive with global config changes.

.. It's just for survive, because I didn't find a better option. :)



Please sign in to leave a comment.