Giter Site home page Giter Site logo

Comments (10)

crazypinger avatar crazypinger commented on July 29, 2024 1

Sorry I figured out that I needed to add define('WP_SCSS_ALWAYS_RECOMPILE', true); in my functions file for it to work.

Thanks for the plug-in

from wp-scss.

timbotcom avatar timbotcom commented on July 29, 2024 1

I believe that causes the scss to recompile every time the page is loaded. Not a viable solution other than in dev.

From what I understand from the documentation, its supposed to know to recompile every time there's a change to any of the scss files in the sass folder...

from wp-scss.

gavin310 avatar gavin310 commented on July 29, 2024 1

My theme doesn't use WordPress's standard head functions, so I had to edit the plugin. In wp-scss.php in the plugin's root folder, I changed:

add_action('wp_head', 'wp_scss_needs_compiling');

to

add_action( 'wp_loaded', 'wp_scss_needs_compiling' );

from wp-scss.

crazypinger avatar crazypinger commented on July 29, 2024

I'm finding the same behavior in MAMP running php 5.6.2 and WordPress 4.3.1.

The scss file is called site.scss and in the /css folder the site.css has this in it
/*# sourceMappingURL=site.css.map */

from wp-scss.

shanecarmody avatar shanecarmody commented on July 29, 2024

@gavin310 solution worked for me, is this change going to be made in the plugin?

from wp-scss.

brrn avatar brrn commented on July 29, 2024

We can look into this. Would wp_loaded be a better hook for the plugin to use by default?

from wp-scss.

garrettw avatar garrettw commented on July 29, 2024

Based on what I see here, I wonder if setup_theme might actually be the ideal hook to use. But of course, enqueueing stylesheets needs to go elsewhere.

from wp-scss.

brrn avatar brrn commented on July 29, 2024

@garrettw that looks promising. It would ensure that the function fires every time, while also keeping it before theme load. We'll test this.

from wp-scss.

smontoro avatar smontoro commented on July 29, 2024

Sorry I figured out that I needed to add define('WP_SCSS_ALWAYS_RECOMPILE', true); in my functions file for it to work.

Thanks for the plug-in

That worked for me too! Thanks!

from wp-scss.

mdarmanin avatar mdarmanin commented on July 29, 2024

Guys, since recent update, my SCSS wasn't compiling anymore so after loads of time wasting trying to find out why, I found out that define('WP_SCSS_ALWAYS_RECOMPILE', true); was required for me too. Try to prevent this in future releases or at least add a setting in plugin to turn this on without searching half the net. Rigid testing may also help.

from wp-scss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.