raptor icon indicating copy to clipboard operation
raptor copied to clipboard

What should Raptor do about assets?

Open garybernhardt opened this issue 13 years ago • 8 comments

Tom, when you asked "Should raptor include asset serving itself?", are you asking about simply serving a public directory, or are you asking about fancy asset pipeline stuff like the changes in Rails 3 that I don't understand?

garybernhardt avatar Feb 18 '12 01:02 garybernhardt

Yes

Both of those (but seperately)

tcrayford avatar Feb 18 '12 01:02 tcrayford

What do Sinatra folks do?

garybernhardt avatar Feb 18 '12 01:02 garybernhardt

Often times (from what I can see in their docs, and from experience), they'll write an action of their own that directly serves assets (and e.g. compiles coffeescript on the fly) for development mode. By default, sinatra just serves all files under /public by default.

I think serving stuff out of public is good enough for me for now (I can compile sass by myself)

tcrayford avatar Feb 18 '12 01:02 tcrayford

Looking at sinatra's source code, they inlined the static serving into the framework (probably for speed).

tcrayford avatar Feb 18 '12 15:02 tcrayford

I think that's a reasonable thing to do: mount some Rack app to serve static content.

garybernhardt avatar Feb 20 '12 04:02 garybernhardt

In raptor right? I can probably send a pull request soon.

tcrayford avatar Feb 20 '12 13:02 tcrayford

how about Rack::Static? Isn't that good enough?

psyho avatar Feb 21 '12 15:02 psyho

We probably want Rack::File instead of Static, at least as I see it.

tcrayford avatar Feb 21 '12 17:02 tcrayford