var $types = array(
'css' => 'text/css',
'js' => 'text/javascript',
+ 'map' => 'application/json'
);
function getAuth()
function get($s='', $opts = Array())
{
-
-
$this->sessionState(0);
$bits = explode('/', $s);
$this->jerr("invalid url");
}
+ $ext = $bits[0];
+ if (preg_match('/\.map$/',$_SERVER['REQUEST_URI'])) {
+ $ext = 'map';
+ }
+
$s = str_replace('/', '-', $bits[1]);
+
$ui = posix_getpwuid(posix_geteuid());
$ff = HTML_FlexyFramework::get();
- $compile = self::getCompileDir($bits[0]);
- //'session_save_path() . '/' .
- // $ui['name'] . '-' . $ff->project . '-' . $ff->version . '-'. $bits[0] . 'compile';
-
- $fn = $compile . '/'. $s .'.'. $bits[0];
+ $compile = self::getCompileDir($bits[0], '', false);
+
+ $fn = $compile . '/'. $s .'.'. $ext;
if (!file_exists($fn)) {
- header('Content-Type: '. $this->types[$bits[0]]);
+ header('Content-Type: '. $this->types[$ext]);
echo "// compiled file not found = $fn";
exit;
$fh = fopen($fn,'r');
fpassthru($fh);
fclose($fh);
- $content = $data;
+
}
switch($type) {
case 'js':
case 'css':
+ case 'scss':
$compile_dir .= implode("-", array(
$ui['name'],
$module,
return false;
}
+
if (file_exists($compile_dir)) {
return $compile_dir;
}
}
require_once 'System.php';
+ $ff = HTML_FlexyFramework::get();
$mods = $this->modulesList();
- $mods[] = $ff->project; // Pman
+ $mods[] = $ff->project; // Pman - this was the old format...
$mods[] = ''; // Pman + appshortname..
foreach ($mods as $module) {