Skip to content

Commit e440fda

Browse files
authored
Update CommonJavascript.php
1 parent 24a5b7a commit e440fda

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/Webfan/CommonJavascript.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,28 @@ public static function getRequireJs(array $config = [], array $plugins = [])
7979
'tmpPath' => \sys_get_temp_dir(),
8080
// 'basePath' => __DIR__,
8181
'basePath' =>array_merge($conf['basePath'], [
82-
getcwd().\DIRECTORY_SEPARATOR.'modules',
82+
//Nee getcwd().\DIRECTORY_SEPARATOR.'modules',
8383
getenv('FRDL_WORKSPACE').\DIRECTORY_SEPARATOR.'modules',
84-
'https://webfan.de/install/modules',
84+
getenv('FRDL_WORKSPACE').\DIRECTORY_SEPARATOR.'node_modules',
85+
'https://startdir.de/install/modules',
8586
'https://webfan.de/install/stable',
8687
'https://webfan.de/install/latest',
87-
getcwd(),
88+
'https://webfan.de/install/modules',
89+
// getcwd(),
8890
]),
8991
'modulesExt' => '.php',
9092
'folderAsModuleFileName' => 'index.php',
9193
'packageInfoFileName' => 'package.php',
9294
// 'autoNamespacing' => false,
9395
'autoNamespacing' => true,
94-
'autoNamespacingCacheExpires' => 24*60*60,
96+
'autoNamespacingCacheExpires' => 31 * 24*60*60,
9597
'validators' => [],
9698
), $conf);
9799

98100
$config['basePath'] = array_merge($config['basePath'], [
99-
getcwd().\DIRECTORY_SEPARATOR.'modules',
100101
'https://webfan.de/install/modules',
101102
getenv('FRDL_WORKSPACE').\DIRECTORY_SEPARATOR.'modules',
102-
getcwd(),
103+
getenv('FRDL_WORKSPACE').\DIRECTORY_SEPARATOR.'node_modules',
103104
]);
104105

105106
$config['basePath'] = array_unique($config['basePath']);
@@ -340,8 +341,12 @@ public static function getRequireJs(array $config = [], array $plugins = [])
340341
// eval($moduleFileContent);
341342
$tempFilename = \Webfan\CommonJavascript::temporaryFile($moduleFileContent, null, $autoNamespacingCacheExpires, $tmpPath);
342343
$exp = var_export([
344+
'id' => $module['id'],
343345
'file'=>$tempFilename,
344346
'time'=>time(),
347+
'sha1' => sha1($moduleFileContent),
348+
'size' => strlen($moduleFileContent),
349+
'source' => $moduleFilePath,
345350
],true);
346351
$phpCode = "<?php\n return $exp;";
347352

0 commit comments

Comments
 (0)