Re: JavaScript as TextMate extension

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: JavaScript as TextMate extension

by Jon Ippolito-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 22, 2009, at 8:00 AM, textmate-request@...  
wrote:

> Personally I'd be in favor of simply using rhino as the js script
> runner. Just need to include it in your bundle of the shared TM
> support folder.
>
> ?Thomas Aylott / subtleGradient


Hi Thomas,

As a JavaScript devotee, I'd love to do this. I've installed Rhino and  
got it running in

~/Library/Java/Extensions

per instructions found at

http://peter.michaux.ca/articles/installing-rhino-on-os-x

When I open ~/Library/Application Support/TextMate, however, I just  
see the Bundles, Plugins, Pristine Copy, and Themes folders. Do I just  
copy Rhino's js.jar file to a new "Extensions" directory?

Presumably I would also need to start a command with a shebang line to  
tell TextMate I'm using a particular scripting language, like

#!/usr/bin/env perl

What would be the equivalent path for Rhino's JavaScript?

Thanks in advance for any guidance!

jon
/RR (http://responserequested.com)
______________________________
Still Water--what networks need to thrive.
http://newmedia.umaine.edu/stillwater/


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: JavaScript as TextMate extension

by Jay Soffian-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jun 22, 2009 at 5:43 PM, Jon Ippolito<jippolito@...> wrote:

> As a JavaScript devotee, I'd love to do this. I've installed Rhino and
> got it running in
>
> ~/Library/Java/Extensions
>
> per instructions found at
>
> http://peter.michaux.ca/articles/installing-rhino-on-os-x
>
> When I open ~/Library/Application Support/TextMate, however, I just
> see the Bundles, Plugins, Pristine Copy, and Themes folders. Do I just
> copy Rhino's js.jar file to a new "Extensions" directory?
>
> Presumably I would also need to start a command with a shebang line to
> tell TextMate I'm using a particular scripting language, like
>
> #!/usr/bin/env perl
>
> What would be the equivalent path for Rhino's JavaScript?

I'm not sure exactly what you're trying to do, but it would be:

#!/usr/bin/java org.mozilla.javascript.tools.shell.Main

j.

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate