Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Closed
pivotal-outright opened this Issue Nov 11, 2011 · 8 comments

Comments

Projects
None yet
3 participants

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

Owner

petebrowne commented Nov 11, 2011

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?

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.

Owner

petebrowne commented Nov 14, 2011

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?

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?

Owner

petebrowne commented Nov 15, 2011

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?

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

Owner

petebrowne commented Feb 23, 2012

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

@petebrowne petebrowne closed this Feb 23, 2012

Owner

petebrowne commented Jun 21, 2012

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