Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass support: HTTP instead FileIO to access file's contents #25

Open
kamilafsar opened this issue Apr 10, 2012 · 2 comments
Open

Sass support: HTTP instead FileIO to access file's contents #25

kamilafsar opened this issue Apr 10, 2012 · 2 comments

Comments

@kamilafsar
Copy link

Hey dirkmc,

Firstly, thanks for such a great plugin.

Last week, we've integrated press into our project and that all works fine for js and css files. Since we're also using a lot of SCSS we needed a way to get compile it before feeding press with it's contents.
In order to do that, I've sort of merged "press" with "play-sass" (https://github.com/guillaumebort/play-sass). It's a bit hacky but it all works fine.

After having it all work, I thought of something better: why doesn't press get the content of files via HTTP instead of FileIO. At least for less, coffee, sass and scss files. The Compressors should declare which file extensions they're interested in, but need to be read via HTTP. Reading those files with HTTP abstracts the knowlegde away from press, about how to compile those file into ordinary js/css. Instead another module could take care of that, as play-sass does really well.

Is there something I'm missing here?

Thanks in advance,

Kamil

@dirkmc
Copy link
Owner

dirkmc commented Apr 10, 2012

I just want to be sure I understand the idea - are you saying that an SCSS file (for example) would be generated by calling back to the web server instead of being generated directly within the plugin?
The idea in general is not a bad one, although I think there might be problems in debug mode, where the server runs in a single thread, and any calls back to itself will cause deadlock.

@kamilafsar
Copy link
Author

Yes, exactly.

Regarding the DEV mode, a single thread shouldn't be an issue if we use continuations.
http://www.playframework.org/documentation/1.2.4/asynchronous

At least, it's worth trying then. I'm going to play! with it today, I'll keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants