Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

75 lines (64 sloc) 2.026 kb
<?php
/**
* @package Joomla.Build
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// Set flag that this is a parent file.
const _JEXEC = 1;
// Load system defines
if (file_exists(dirname(__DIR__) . '/defines.php'))
{
require_once dirname(__DIR__) . '/defines.php';
}
if (!defined('_JDEFINES'))
{
define('JPATH_BASE', dirname(__DIR__));
require_once JPATH_BASE . '/includes/defines.php';
}
require_once JPATH_LIBRARIES . '/import.php';
JLoader::registerPrefix('J', __DIR__ . '/libraries');
require_once JPATH_LIBRARIES . '/cms.php';
// Load the configuration
require_once JPATH_CONFIGURATION . '/configuration.php';
/**
* This script will fetch the update information for all extensions and store
* them in the database, speeding up your administrator.
*
* @package Joomla.Build
* @since 3.0
*/
class GenerateCss extends JApplicationCli
{
/**
* Entry point for the script
*
* @return void
*
* @since 3.0
*/
public function doExecute()
{
$templates = array(
JPATH_ADMINISTRATOR . '/templates/isis/less/template.less' => JPATH_ADMINISTRATOR . '/templates/isis/css/template.css',
JPATH_ADMINISTRATOR . '/templates/hathor/less/template.less' => JPATH_ADMINISTRATOR . '/templates/hathor/css/template.css',
JPATH_ADMINISTRATOR . '/templates/hathor/less/colour_blue.less' => JPATH_ADMINISTRATOR . '/templates/hathor/css/colour_blue.css',
JPATH_ADMINISTRATOR . '/templates/hathor/less/colour_standard.less' => JPATH_ADMINISTRATOR . '/templates/hathor/css/colour_standard.css',
JPATH_SITE . '/templates/protostar/less/template.less' => JPATH_SITE . '/templates/protostar/css/template.css'
);
$less = new JLess;
foreach ($templates as $source => $output)
{
try
{
$less->compileFile($source, $output);
}
catch (Exception $e)
{
echo $e->getMessage();
}
}
}
}
JApplicationCli::getInstance('GenerateCss')->execute();
Jump to Line
Something went wrong with that request. Please try again.