Open brendon opened 6 years ago
The error appear in line 140:
tasks/update.rake:140:in `block in patch_theme_config'
here we see the following code:
must_be_changed(content) { |c| c.gsub(%q{@import "theme.less";}, %q{@import "semantic_ui/theme.less";}) }
As you can see it just replace @import "theme.less";
to @import "semantic_ui/theme.less";
.
Now let's try to find this line in theme.config
. This file was created from theme.config.example
here.
So, let's look at source theme.config.example
here. As you can see this line was changed here and it contains (multiple)
now. So, this code at line 140 can't find @import "theme.less";
and replace it.
How to fix it? If current version of less support multiple
directive then just try to add it to search string. If it doesn't support this directive, so try to remove it like here (look at this comment too) or maybe you can find better solution for this problem.
Thanks for the thorough pointer @maxd :) I really appreciate the info. I was more asking if you'd encountered this in the past before I dug deep but you've saved me some time :)
I think I'll modify the gsub
and try to enforce a minimum version of less going forward but will do a bit more investigation. less-rails
now supports directives.
Here are the last few lines of output when trying to update to the latest version of SemanticUI:
@maxd, before I start digging deep, is there any quick tips you could give?