Permalink
Browse files

Merge branch 'master' of github.com:welaika/wordless

  • Loading branch information...
stefanoverna committed May 9, 2012
2 parents 2f4a2b4 + c8d30d2 commit ebba3486b72d69787032a2853c281e6a061c1117
Showing with 6 additions and 9 deletions.
  1. +1 −1 wordless/preprocessors/less_preprocessor.php
  2. +5 −8 wordless/wordless.php
@@ -82,7 +82,7 @@ protected function error($description) {
*/
protected function process_file($file_path, $result_path, $temp_path) {
- $this->validate_executable_or_die($this->preference("css.lessc_path"));
+ $this->validate_executable_or_throw($this->preference("css.lessc_path"));
// On cache miss, we build the file from scratch
$pb = new ProcessBuilder(array(
View
@@ -120,11 +120,8 @@ public static function compile_assets() {
$compiled_file_path = preg_replace("/\." . $extension . "$/", ".".$preprocessor->to_extension(), $compiled_file_path);
try {
- ob_start();
- $to_process_file_path = preg_replace("/\." . $extension . "$/", "", $file_path);
- $preprocessor->process_file_with_caching($to_process_file_path, Wordless::theme_temp_path());
- $compiled_content = ob_get_contents();
- ob_end_clean();
+ $to_process_file_path = preg_replace("/\." . $extension . "$/", "", $file_path);
+ $compiled_content = $preprocessor->process_file_with_caching($to_process_file_path, Wordless::theme_temp_path());
} catch(WordlessCompileException $e) {
echo "Problems compiling $file_path to $compiled_file_path\n\n";
echo $e;
@@ -194,12 +191,12 @@ public static function load_i18n() {
public static function require_helpers() {
require_once Wordless::join_paths(dirname(__FILE__), "helpers.php");
$helpers_path = self::theme_helpers_path();
- self::require_once_dir("$helpers_path");
+ self::require_once_dir($helpers_path);
}
public static function require_theme_initializers() {
$initializers_path = self::theme_initializers_path();
- self::require_once_dir("$initializers_path");
+ self::require_once_dir($initializers_path);
}
/**
@@ -271,7 +268,7 @@ public static function theme_static_javascripts_path() {
}
public static function theme_temp_path() {
- return self::join_paths(get_template_directory(), 'tmp');
+ return self::preference("theme.temp_dir", self::join_paths(get_template_directory(), 'tmp'));
}
public static function theme_url() {

0 comments on commit ebba348

Please sign in to comment.