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

Recompiling main file when dependency changed #35

Open
m-j opened this issue Aug 22, 2014 · 5 comments
Open

Recompiling main file when dependency changed #35

m-j opened this issue Aug 22, 2014 · 5 comments

Comments

@m-j
Copy link

m-j commented Aug 22, 2014

I'm using 0.2.0 version of plugin for play 2.1.1. I have a problem with dependencies. My scss files are organized in following way:

main.scss
dep1.scss
dep2.scss

main.css file is included in html.

Whenever I change something in dep1.scss it gets compiled but what I really need is main.scss to be recompiled since this scss file produces css stylesheet that is included in html.

I there any way around that? Maybe this problem is fixed in newer version of plugin (for play 2.3)?

@freiguy1
Copy link

We're using this plugin and play framework 2.2.1. Still same issue. @m-j have you done anything to help with this? It seems we must modify and unmodify main.css every time we want a change in a dependency file to be realized.

@m-j
Copy link
Author

m-j commented Feb 18, 2015

@freiguy1 I worked around this problem - I removed play-sass plugin and delegated all work to grunt. Now grunt does sass compilation and watching.

Here you have some article how to do that:
http://eng.kifi.com/hooking-in-to-play-frameworks-sbt-plugin-lifecycle/

Generally I believe that we should rely on tools like grunt and glup to deal with web assets. They have better support and are used by wider community. I used this approach in another project (.NET this time) and it seems to work fine as well.

@iphilgood
Copy link

+1

@m-j I'm really interested in your workaround. Is there any specific code you can show me what your hook and Gruntfile does look like? And an additional question I'm asking myself is how do you handle the deployment?

Thx for your help

@freiguy1
Copy link

I wrote a little gist about what I did. Maybe that will point you in the right direction.

@iphilgood
Copy link

Thank you so much @freiguy1 🎉 This is exactly what I'm looking for! I'll try it out as soon as I got time 👍

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

3 participants