/
defines.php
35 lines (28 loc) · 1.3 KB
/
defines.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace AssetPipeline;
use Symphony;
function define_here($name, $value)
{
define(__NAMESPACE__ . '\\' . $name, $value);
}
define_here('ID', 'asset_pipeline');
define_here('EXTENSION', \EXTENSIONS . '/' . ID);
define_here('URL', \URL . '/extensions/' . ID);
define_here('ASSETS_URL', URL . '/assets');
//define_here('SELF_WORKSPACE', \WORKSPACE . '/asset-pipeline');
//define_here('CONFIG', SELF_WORKSPACE . '/config');
$self_manifest = \MANIFEST . '/asset-pipeline';
define_here('ASSET_CACHE', $self_manifest . '/cache');
define_here('PRECOMPILED_FILES', $self_manifest .'/precompiled-files.php');
define_here('SYMLINKS', $self_manifest . '/symlinks');
$settings = Symphony::Configuration()->get(ID);
define_here('INSTALLATION_COMPLETE', (bool)$settings);
if (INSTALLATION_COMPLETE) {
define_here('SOURCE_FILES', \WORKSPACE . '/' . trim($settings['source_directory'], '/'));
//echo SOURCE_FILES; die;
$output_dir = trim($settings['output_directory'], '/');
$use_docroot = ($settings['output_parent_directory'] == 'docroot');
define_here('OUTPUT_DIR', ($use_docroot ? \DOCROOT : \WORKSPACE) . '/' . $output_dir);
//define_here('OUTPUT_URL', \URL . ($use_docroot ? '/' : '/workspace/') . $output_dir);
define_here('OUTPUT_URL', ($use_docroot ? '/' : '/workspace/') . $output_dir);
}