helping CompileAssets to work
This commit is contained in:
parent
cb1f338d27
commit
4d2a7afd38
@ -9,7 +9,17 @@ class CompileAssets
|
|||||||
{
|
{
|
||||||
static public function compile()
|
static public function compile()
|
||||||
{
|
{
|
||||||
require __DIR__ . '/../../config/boot.php';
|
$railsRoot = __DIR__ . '/../..';
|
||||||
|
|
||||||
|
# Create temporary config/config.php file
|
||||||
|
$file = $railsRoot . '/config/config.php.example';
|
||||||
|
$target = $railsRoot . '/config/config.php';
|
||||||
|
copy($file, $target);
|
||||||
|
|
||||||
|
require $railsRoot . '/config/boot.php';
|
||||||
\Rails::assets()->compileAll();
|
\Rails::assets()->compileAll();
|
||||||
|
|
||||||
|
# Delete temporary config file.
|
||||||
|
unlink($target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user