Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Any thoughts on plans for supporting procs for asset prefix? #1

Closed
pivotal-outright opened this Issue · 8 comments

3 participants

@pivotal-outright

We attempted to fork and add this functionality. We got the specs passing, but in our Sprockets precompile, Sass was not liking our fix.

Take a look at our fork, but it's not worth merging in just yet.

https://github.com/outright/sprockets-helpers

@petebrowne
Owner

I hadn't thought of it, but sounds useful. After looking at your fork, I'm not really sure what the problem is though. Can you tell me more about your precompile setup? Are you using sinatra-asset-pipeline?

@pivotal-outright

No. We're wedging Sprockets 2 into a Rails 2 app. Which means we're recreating the Rails 3.1 asset pipeline as closely as possible.

We'd hacked Sasset (https://github.com/CapnKernul/sasset) to support the 'Pipeline. But it's not enough in development - while sprockets-sass worked great in dev, but we needed this fix for production. Sass puked all over itself on render, likely because calls are happening out of order. But we gave up trying to understand all of Sprockets' guts.

Our fix right now is to use our fork of Sasset in production (really, just the precompile step), but to gem 'sprockets-sass' in dev. We're not explicitly using sprockets-helpers.

@petebrowne
Owner

So you're not using the helper functions and it seems like they're breaking things? Would adding an option to not include them by default help?

@pivotal-outright

We're using the helpers in development. But when we precompile the assets, loading the helpers during our rake task, calling a helper that executes the proc is what fails. Does that make sense?

@petebrowne
Owner

Yeah I think so. I'm not really sure how to help. Would it be possible to build a minimal version of your setup that I can use to test?

@ifightcrime

Just to chime in, this would help me out a ton as well.

@petebrowne
Owner

I went and ahead and implemented this. Thanks for the help & input. Please try v0.3.0.

@petebrowne petebrowne closed this
@petebrowne
Owner

I've added support for real asset hosts in v0.5.0. I feel like this feature was attempting to simulate asset hosts and was no longer necessary, so I've deprecated it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.