mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
61 lines
2.1 KiB
PHP
61 lines
2.1 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2013 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Alchemy\Phrasea\Core\CLIProvider;
|
|
|
|
use Silex\Application;
|
|
use Silex\ServiceProviderInterface;
|
|
use Alchemy\Phrasea\Utilities\Less\Builder as LessBuilder;
|
|
use Alchemy\Phrasea\Utilities\Less\Compiler as LessCompiler;
|
|
|
|
class LessBuilderServiceProvider implements ServiceProviderInterface
|
|
{
|
|
public function register(Application $app)
|
|
{
|
|
$app['phraseanet.less-assets'] = $app->share(function ($app) {
|
|
return array(
|
|
$app['root.path'] . '/www/assets/bootstrap/img/glyphicons-halflings-white.png' => $app['root.path'] . '/www/skins/build/bootstrap/img/glyphicons-halflings-white.png',
|
|
$app['root.path'] . '/www/assets/bootstrap/img/glyphicons-halflings.png' => $app['root.path'] . '/www/skins/build/bootstrap/img/glyphicons-halflings.png',
|
|
);
|
|
});
|
|
|
|
$app['phraseanet.less-mapping.base'] = $app->share(function ($app) {
|
|
return array();
|
|
});
|
|
|
|
$app['phraseanet.less-mapping.customizable'] = $app->share(function ($app) {
|
|
return array(
|
|
$app['root.path'] . '/www/skins/login/less/login.less' => $app['root.path'] . '/www/assets/build/login.css',
|
|
$app['root.path'] . '/www/skins/account/account.less' => $app['root.path'] . '/www/assets/build/account.css',
|
|
);
|
|
});
|
|
|
|
$app['phraseanet.less-mapping'] = $app->share(function ($app) {
|
|
return array_merge(
|
|
$app['phraseanet.less-mapping.base'],
|
|
$app['phraseanet.less-mapping.customizable']
|
|
);
|
|
});
|
|
|
|
$app['phraseanet.less-compiler'] = $app->share(function ($app) {
|
|
return new LessCompiler($app['filesystem'], $app['driver.recess']);
|
|
});
|
|
|
|
$app['phraseanet.less-builder'] = $app->share(function ($app) {
|
|
return new LessBuilder($app['phraseanet.less-compiler'], $app['filesystem']);
|
|
});
|
|
}
|
|
|
|
public function boot(Application $app)
|
|
{
|
|
}
|
|
}
|