barista icon indicating copy to clipboard operation
barista copied to clipboard

Installation and js loading

Open marcandre opened this issue 13 years ago • 2 comments

Barista looks awesome.

I installed it and converted a html :javascript to :coffeescript.

Without any other change (Rails 3.0.4 in development, no fiddling with default javascripts, empty barista config) it doesn't work because the client side coffeescript.js is not loaded (and the source html has the script as "text/coffeescript")

I changed the config with c.embedded_interpreter = false and that bypasses the issue.

  1. Wouldn't it be best to add "coffeescript" to the default javascript sources?
  2. In the meantime, is there a standard way of embedding "coffeescript.js"?
  3. I'd recommend adding the embedded_interpreter option (commented) in the generated config.

Thanks!

marcandre avatar Mar 04 '11 19:03 marcandre

  1. I'm against adding it to the default sources for a couple of reasons (namely, I'm still not sold on embedding the interpreter - but I'm going to change the default to true for the next version).
  2. In rails, the (currently undocumented) coffeescript_interpreter_js helper is what you're looking for.
  3. Excellent idea - I've just added it (and will push out in the next gem release).

Sutto avatar Mar 06 '11 15:03 Sutto

Cool.

As for (1), you could embed it by default only if "emebedded_interpreter" is true. Otherwise, documentation for (2) in the installation notes would do too.

Thanks!

marcandre avatar Mar 06 '11 16:03 marcandre