This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via e0e506b8b45546f88287222d045c44b7d0b5d19e (commit)
via d1b5f408b1ce297df33e3ca832655c7bf36cca0f (commit)
via 82a869a23d2b9f0157ec8d87a85769446e81503c (commit)
from c464926bd305acddc990d7c808ac524d18d3e855 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e0e506b8b45546f88287222d045c44b7d0b5d19e
Author: Ivan Borzenkov <iva...@li...>
Date: Tue Jan 11 14:29:49 2011 +0300
Не использовать кеш в compass и Make файл для генерации продакшена
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0e89d7b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+#мейк файл для основных действий
+
+all:
+ php cron/start.php css/gen
+ php cron/start.php js/gen
+ - compass compile -e production --force
+ #- compass compile --output-style compressed --force
+
+daemon:
+ - compass watch
+
+clean: compass_clean
+ php cron/start.php css/clean
+ php cron/start.php js/clean
+
+compass_clean:
+ - find application/_common/css -name '*.s[ac]ss' | sed 's/application\/_common/www/' | sed 's/\.s[ac]ss/\.css/' | xargs -I'{}' rm {}
+
+.PHONY:
+ clean compass_clean
\ No newline at end of file
diff --git a/config.rb b/config.rb
index 454a4d7..1981215 100644
--- a/config.rb
+++ b/config.rb
@@ -7,3 +7,6 @@ images_dir = "www/img"
javascripts_dir = "www/js"
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
+
+sass_options = { :cache => false }
+
commit d1b5f408b1ce297df33e3ca832655c7bf36cca0f
Author: Ivan Borzenkov <iva...@li...>
Date: Tue Jan 11 14:29:15 2011 +0300
Расширения файлов scss.php и js.php для генеримых
diff --git a/application/default/controllers/CssController.php b/application/default/controllers/CssController.php
index 4374492..d5f0651 100644
--- a/application/default/controllers/CssController.php
+++ b/application/default/controllers/CssController.php
@@ -30,7 +30,7 @@ class CssController
QFW::$view->mainTemplate = '';
$args = func_get_args();
$css = implode('/', $args);
- $scss = str_replace('.css', '.scss', $css);
+ $scss = str_replace('.css', '.scss.php', $css);
if (!is_file($this->path.'/'.$scss))
QFW::$router->show404();
@@ -61,14 +61,17 @@ class CssController
$ret = false;
chdir($this->path);
QFW::$view->setScriptPath($this->path);
- exec('find . -name \'*.scss\'', $out, $ret);
+ exec('find . -name \'*.scss.php\'', $out, $ret);
if ($ret)
return;
foreach ($out as $file)
{
- $css = str_replace('.scss', '.css', $file);
+ $css = str_replace(
+ array('.scss.php', './'),
+ array('.css', DOC_ROOT.'/css/'),
+ $file);
$text = QFW::$view->fetch($file);
- exec('echo '.escapeshellarg($text).' | '.self::SASS.' 2>&1 | unexpand -t2 --first-only > '.DOC_ROOT.'/css/'.$css, $out, $ret);
+ exec('echo '.escapeshellarg($text).' | '.self::SASS.' 2>&1 | unexpand -t2 --first-only > '.$css, $out, $ret);
}
}
@@ -80,13 +83,13 @@ class CssController
$out = array();
$ret = false;
chdir($this->path);
- exec('find . -name \'*.scss\'', $out, $ret);
+ exec('find . -name \'*.scss.php\'', $out, $ret);
if ($ret)
return;
foreach ($out as $file)
{
$css = str_replace(
- array('.scss', './'),
+ array('.scss.php', './'),
array('.css', DOC_ROOT.'/css/'),
$file);
if (is_file($css))
diff --git a/application/default/controllers/JsController.php b/application/default/controllers/JsController.php
index 798906f..fd772dc 100644
--- a/application/default/controllers/JsController.php
+++ b/application/default/controllers/JsController.php
@@ -25,12 +25,13 @@ class JsController
QFW::$view->mainTemplate = '';
$args = func_get_args();
$js = implode('/', $args);
- if (!is_file($this->path.'/'.$js))
+ $jsp = str_replace('.js', '.js.php', $js);
+ if (!is_file($this->path.'/'.$jsp))
QFW::$router->show404();
header('Content-Type: application/javascript');
QFW::$view->setScriptPath($this->path);
- $text = QFW::$view->fetch($js);
+ $text = QFW::$view->fetch($jsp);
return $text;
}
@@ -44,11 +45,14 @@ class JsController
$ret = false;
chdir($this->path);
QFW::$view->setScriptPath($this->path);
- exec('find . -name \'*.js\'', $out, $ret);
+ exec('find . -name \'*.js.php\'', $out, $ret);
if ($ret)
return;
foreach ($out as $file)
- file_put_contents(DOC_ROOT.'/js/'.$file, QFW::$view->fetch($file));
+ {
+ $js = str_replace('.js.php', '.js', $file);
+ file_put_contents(DOC_ROOT.'/js/'.$js, QFW::$view->fetch($file));
+ }
}
/**
@@ -59,12 +63,15 @@ class JsController
$out = array();
$ret = false;
chdir($this->path);
- exec('find . -name \'*.js\'', $out, $ret);
+ exec('find . -name \'*.js.php\'', $out, $ret);
if ($ret)
return;
foreach ($out as $file)
{
- $js = str_replace('./', DOC_ROOT.'/js/', $file);
+ $js = str_replace(
+ array('.js.php', './'),
+ array('.js', DOC_ROOT.'/css/'),
+ $file);
if (is_file($js))
unlink($js);
}
commit 82a869a23d2b9f0157ec8d87a85769446e81503c
Author: Ivan Borzenkov <iva...@li...>
Date: Tue Jan 11 14:11:30 2011 +0300
Поправил пути в кроне
diff --git a/cron/cruise.php b/cron/cruise.php
index 3da151c..b270253 100644
--- a/cron/cruise.php
+++ b/cron/cruise.php
@@ -1,6 +1,6 @@
<?php
- define ('DOC_ROOT', realpath(dirname(__FILE__).'../www'));
- define ('ROOTPATH', realpath(dirname(__FILE__).'/../'));
+ define ('DOC_ROOT', dirname(dirname(__FILE__)).'/www');
+ define ('ROOTPATH', dirname(dirname(__FILE__)));
define ('APPPATH', ROOTPATH . '/application');
define ('VARPATH', ROOTPATH . '/var');
define ('QFWPATH', ROOTPATH . '/QFW');
diff --git a/cron/start.php b/cron/start.php
index 34453ab..9afe7ce 100644
--- a/cron/start.php
+++ b/cron/start.php
@@ -1,6 +1,6 @@
<?php
- define ('DOC_ROOT', realpath(dirname(__FILE__).'../www'));
- define ('ROOTPATH', realpath(dirname(__FILE__).'/../'));
+ define ('DOC_ROOT', dirname(dirname(__FILE__)).'/www');
+ define ('ROOTPATH', dirname(dirname(__FILE__)));
define ('APPPATH', ROOTPATH . '/application');
define ('VARPATH', ROOTPATH . '/var');
define ('QFWPATH', ROOTPATH . '/QFW');
-----------------------------------------------------------------------
Summary of changes:
Makefile | 20 ++++++++++++++++++++
application/default/controllers/CssController.php | 15 +++++++++------
application/default/controllers/JsController.php | 19 +++++++++++++------
config.rb | 3 +++
cron/cruise.php | 4 ++--
cron/start.php | 4 ++--
6 files changed, 49 insertions(+), 16 deletions(-)
create mode 100644 Makefile
hooks/post-receive
--
quickfw
|