Sublime Forum

Coffeescript embedded within html

#1

An ancient post, Inline CoffeeScript (in HTML file), claims that a hack can be made to the HTML package so that it allows coffeescript to be embedded within script tags in HTML.

I don’t believe this works for ST3 … I can’t find the required HTML.tmLanguage file for ST3, just ST2. Config changes in ST3?

In addition, there are different coffeescript packages for ST, I believe. Better Coffeescript and the original one by jeremy ashkenas, for TextMate, but apparently worked in earlier STs, hopefully ST3?

The question:

  • How do I modify/configure the HTML package for ST3 to allow coffeescript inline script tags?

  • If that can be done, which coffeescript package does it work with?

    – Owen

0 Likes

HTML package does not recognize CoffeeScript
#2

This sublimetext.com/docs/3/packages.html may explain why I wasn’t able to find the HTML.tmLanguage file, its in the new ST3 package zip.

I think that the new ST3 package format and path/config would let me build a modified tmLanguage in my “user” package world, which would override the one in the executable’s zip file.

The questions remain however … how to modify HTML’s latest package and how to have it refer to better coffeescript, and how to do it with the new ST3 package config.

0 Likes