preg replace is better
This commit is contained in:
parent
90b7e3d3bc
commit
c037d09840
2 changed files with 1 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
/vendor/
|
|
||||||
composer.lock
|
composer.lock
|
||||||
|
|
|
@ -37,7 +37,7 @@ function compile () {
|
||||||
|
|
||||||
foreach ( $lessfiles as $lessfile ) {
|
foreach ( $lessfiles as $lessfile ) {
|
||||||
$lessmtime = filemtime( $lessfile );
|
$lessmtime = filemtime( $lessfile );
|
||||||
$cssfile = str_replace( '.less', '.css', $lessfile );
|
$cssfile = preg_replace( '/\.less$/i', '.css', $lessfile );
|
||||||
$cssmtime = file_exists ( $cssfile ) ? filemtime( $cssfile ) : '0';
|
$cssmtime = file_exists ( $cssfile ) ? filemtime( $cssfile ) : '0';
|
||||||
|
|
||||||
if ( $cssmtime < $lessmtime ) {
|
if ( $cssmtime < $lessmtime ) {
|
||||||
|
|
Loading…
Reference in a new issue