Closed 10xLaCroixDrinker closed 10 years ago
Cool, sounds like you know more about this than I do! Want to do a pull request or point me in the right direction? :-)
I got a bit of a start on it earlier. Right now it's generating a lot of errors. I'll submit a pull request as soon as I get a chance to fix that.
Great thanks! :+1:
@balupton This will require passing the actual file instead of stdin
. Are you open to that?
Hrmmm. That poses a really interesting shift.
Stdin is essential for say using eco in your sass, or if other plugins also do modifications to the file pre-sass compilation. In the future, with importers bevry/docpad#500 we will also support files that may not have a physical location on the file system, but rather a database instead...
It actually sounds like an issue on sass's side that it doesn't support source maps for stdin, if you could post a report on their issue tracker and chime me in, that would be great.
Taking a look at the pull request you've done up #15 the usage of files for sourcemaps currently sounds fine to me (at least until sass implement source maps for stdin their side). However, we need to continue to support stdin. So what about updating the pull request so that when sourcemaps are used, we use the file, and when they aren't we use stdin - good plan? Also, if you know a better solution, keen to hear it too!
Good plan. I made the change you suggested.
I'm a bit curious though about the use case for using eco on Sass. Could you provide one?
Cool, will check it out later.
For the use case of eco and css, I've had to do it a few times, most recently in the startup hostel website here: https://github.com/bevry/startup-hostel/blob/master/src/documents/styles/style.css.styl.eco#L138-L141
That will fetch all the people's avatar urls, download them locally with cachr, and then with a css post-processor embed the local file data directly into the compiled css file - final result here: http://startuphostel.org/styles/style.css?timestamp=1373415898518 - allowing us to have all of our many user avatars embedded into the one css file - cutting down on requests and download time signficantly.
Wow, that's a great idea. Thanks for sharing.
Did you consider using node-sass instead of the ruby gem?
@jking90 see #11 in reference to using node-sass
Closed by #15
Add an option to enable sourcemaps with Sass 3.3.0.alpha