Compiled JavaScript - how to set it up? [SOLVED]

Hi everybody!

I have a situation like this: I would like to have another extension - let say *.djs for files with javascript content. When I edit it I would like to see the JavaScript highlighting and all the good thinks related to it. Now this is easy to do - just add the extension to the list. My problem starts with the fact that I would like this file to be generated. Specifically I would like to replace every string constance by Struts tag for I18N. Also some parts of this JavaScript will be dynamically generated.

So to make Idea compile *.djs for me before deployment *.djs has to be in JSP list, but than all the JavaScript goodies are gone. If this is in JavaScript list than Idea is not compiling it (and is showing errors for the Struts imports -as expected).

How can I have something which will be compiled like jsp and rendered as JavaScript?

Thanks for any hint.

Jerzy

Message was edited by:
Jerzy Puchala

0
2 comments

jsp with <%@ page contentType="text/javascript"%>

Jerzy Puchala wrote:

Hi everybody!

I have a situation like this: I would like to have another extension - let say *.djs for files with javascript content. When I edit it I would like to see the JavaScript highlighting and all the good thinks related to it. Now this is easy to do - just add the extension to the list. My problem starts with the fact that I would like this file to be generated. Specifically I would like to replace every string constance by Struts tag for I18N. Also some parts of this JavaScript will be dynamically generated.

So to make Idea compile *.djs for me before deployment *.djs has to be in JSP list, but than all the JavaScript goodies are gone. If this is in JavaScript list than Idea is not compiling it (and is showing errors for the Struts imports -as expected).

How can I have something which will be compiled like jsp and rendered as JavaScript?

Thanks for any hint.

Jerzy



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

:D :D

Thank you 10^100 times.

Jerzy

0

Please sign in to leave a comment.