redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

SCSS Compiler

Open Jim-E opened this issue 11 years ago • 14 comments

Developing a theme that uses the Leafo SASS/SCSS compiler. I don't see any reason to keep the one in our theme when we can use the one included in Redux which seems to work fine.

Opinions / comments?

Thanks

Redux embedded v3.3.9.26 WP v4.1

Jim-E avatar Dec 21 '14 10:12 Jim-E

I suppose it depends on the implementation? Meaning, are you going to include the compiler itself from our core? That shouldn't be a problem. Have you tried it yet?

kprovance avatar Dec 21 '14 17:12 kprovance

Turns out the version we are using (which is the newest as of last week) does not support PHP 5.2. And as you probably know, WP still does, which means people are still using it (and obvious by another ticket here). I notified the vendor, but I don't expect him to go backward in terms of compatibility, so I'll be changing all the DIR code in his base so it works with PHP 5.2. It's a complete and utter terrible situation, but what can one do? ;-)

kprovance avatar Dec 21 '14 18:12 kprovance

Pushed v3.3.9.27 so PHP 5.2 won't cry like a jilted school girl. ;)

kprovance avatar Dec 21 '14 18:12 kprovance

Right, just changed our include path: require (dirname(FILE) . '/redux-framework/ReduxCore/inc/scssphp/scss.inc.php'); So far seems to work. Next week I'll test with latest Redux and PHP 5.2

Thanks

Jim-E avatar Dec 21 '14 19:12 Jim-E

Alternatively, you could also use (provided Redux has already loaded):

ReduxFramework::$_dir . 'inc/scssphp/scss.inc.php'

Saves you the trouble of hard coding the path to the core.

kprovance avatar Dec 21 '14 23:12 kprovance

Great tip, thanks, added it to my TODO.

Jim-E avatar Dec 22 '14 01:12 Jim-E

Looks like they fixed the PHP 5.2 thing: https://github.com/leafo/scssphp/pull/15

Sorry about the edits

Jim-E avatar Dec 22 '14 13:12 Jim-E

It doesn't look like a fix, it looks like they kick back a message about no 5.2 compatibility? The code that causes the problem is still there, in the repo. Well, either way, our version will work just fine. Unless they make significant changes to the scss.inc.php, which simply includes the core files, we can still update core code without messing up our compatibility hack. No worries. :)

kprovance avatar Dec 22 '14 17:12 kprovance

Looks like Redux uses the scssphp Develop branch, which does not support php 5.2 but has compileFile, checkedCompile & cachedCompile, cool.

Jim-E avatar Dec 23 '14 15:12 Jim-E

Yea, we're hacking it to include 5.2 support. ;)

dovy avatar Dec 23 '14 17:12 dovy

We already did. I believe. Yeah, the develop branch seemed more interesting. However, if it becomes too much of an issue with 5.2, we can always go to the master branch.

kprovance avatar Dec 23 '14 18:12 kprovance

Unless I missed something I need to fix, I'm closing the ticket. Please reopen if I missed something! :)

kprovance avatar Dec 26 '14 19:12 kprovance

@Jim-E , I had to go back to the old 0.0.12 install of scssphp, because too many people are still using that bloody PHP 5.2 :( :( :(

How difficult do you think it might be to fork their develop branch, ditch the namespace stuff and make it 5.2 usable?

kprovance avatar Jan 02 '15 19:01 kprovance

Wow, http://php.net/archive/2010.php end of life was over 4 years ago, but it just won't die!

I have an elderly parent going through chemo/radiation and soon surgery so at the moment time is an issue. This merge made it look easy back in 2012.

I may be going back to LESS :( due to the way SASS handles !default), still researching and testing though.

Jim-E avatar Jan 03 '15 09:01 Jim-E