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

cscc file in multimodule project copied but not processed #18

Open
mslinn opened this issue Sep 19, 2016 · 7 comments
Open

cscc file in multimodule project copied but not processed #18

mslinn opened this issue Sep 19, 2016 · 7 comments

Comments

@mslinn
Copy link

mslinn commented Sep 19, 2016

In my multimodule Play webapp, I put the following in modules/cadenza/app/assets/stylesheets/main3.scss:

@import "lib/cadenza/redmond/jquery-ui.css";
@import "lib/cadenza/redmond/jquery.ui.theme.css";
@import "lib/cadenza/css/bootstrap.css";
@import "lib/cadenza/css/bootstrap-datepicker.css";
@import "lib/cadenza/dropzone.css";

I had to modify the @import path recommended by the docs to account for the placement of the lib/ directory in a multimodule project. The following files were output:

./target/web/public/main/stylesheets/main3.css
./target/web/classes/main/META-INF/resources/webjars/cadenza/3.0.0/stylesheets/main3.css
./target/web/sass/main/stylesheets/main3.css

All of the generated files had the @import statements intact, without any expansion.

I then put this line at the top:

@import "lib/compass-mixins/lib/compass";

... but I got:

Error: Functions may not be defined within control directives or other mixins.
        on line 81 of modules/cadenza/target/web/web-modules/main/webjars/lib/compass-mixins/lib/compass/functions/_lists.scss
>>   @function compact($vars...) {
   --^
In /var/work/training/cadenza/modules/cadenza/target/web/web-modules/main/webjars/lib/compass-mixins/lib/compass/functions/_lists.scss:81
77  @return nth($list, 1);
78}
79
80@if not(function-exists(compact)) {
81  @function compact($vars...) { 
82    $list: ();
83    @each $var in $vars {
84        @if $var {
85            $list: append($list, $var, comma);

I tried upgrading to "compass-mixins" % "1.0.2" and that eliminated the error, but still the @import statements were not expanded.

@irundaia
Copy link
Owner

To be honest I haven't tested with a multimodule project.

@mslinn could you perhaps provide a repo with a minimal example? I'll have a look at it once I get home from my day job.

Thanks for the report!

@irundaia
Copy link
Owner

Also, just to be sure, which version of sbt-sassify are you using?

@irundaia irundaia reopened this Sep 20, 2016
@mslinn
Copy link
Author

mslinn commented Sep 20, 2016

I used sbt-sassify v1.4.6. I'll put a multimodule example together for you tomorrow.

@irundaia
Copy link
Owner

Great thanks! I think that it might be caused because you're importing css files rather than scss files. I'll have a look whether this compiles with sassc/ruby sass

@mslinn
Copy link
Author

mslinn commented Sep 20, 2016

I got most of what I wanted working. The project is here. The bottom of the README has a few questions for you.

@irundaia
Copy link
Owner

I'll have a look at it this evening. Thanks for the example

@irundaia
Copy link
Owner

irundaia commented Sep 28, 2016

I wanted to give an update on this issue. I've checked out the project from the git repo, but SBT seems to stall when running sbt assets (both on Windows and OS X). Unfortunately, I haven't found enough time to figure out why SBT stalls... I'm iteratively removing parts of the build to see which part is blocking SBT

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