config.php in Sassy 7
File
phamlp/sass/extensions/compass/config.php
View source
<?php
class SassExtentionsCompassConfig {
public static $config;
private static $defaultConfig = array(
'project_path' => '',
'http_path' => '/',
'css_dir' => 'css',
'css_path' => '',
'http_css_path' => '',
'fonts_dir' => 'fonts',
'fonts_path' => '',
'http_fonts_path' => '',
'images_dir' => 'images',
'images_path' => '',
'http_images_path' => '',
'javascripts_dir' => 'javascripts',
'javascripts_path' => '',
'http_javascripts_path' => '',
'relative_assets' => true,
);
public function config($config) {
if (is_array($config)) {
self::$config = array_merge(self::$defaultConfig, $config);
self::setDefaults();
}
elseif (is_string($config) && isset(self::$config[$config])) {
return self::$config[$config];
}
}
private static function setDefaults() {
foreach (array(
'css',
'images',
'fonts',
'javascripts',
) as $asset) {
if (empty(self::$config[$asset . '_path'])) {
self::$config[$asset . '_path'] = self::$config['project_path'] . DIRECTORY_SEPARATOR . self::$config[$asset . '_dir'];
}
if (empty(self::$config['http_' . $asset . '_path'])) {
self::$config['http_' . $asset . '_path'] = self::$config['http_path'] . self::$config[$asset . '_dir'];
}
}
}
}