MDL-62497 javascript: add babel transpiling to Grunt for ES6 support
This commit is contained in:
committed by
Andrew Nicols
parent
67b2262938
commit
c53f86d408
@@ -75,9 +75,10 @@ class core_requirejs {
|
||||
* <componentdir>/amd/src/modulename.js
|
||||
*
|
||||
* @param boolean $debug If true, returns the paths to the original (unminified) source files.
|
||||
* @param boolean $includelazy If true, includes modules with the -lazy suffix.
|
||||
* @return array $files An array of mappings from module names to file paths.
|
||||
*/
|
||||
public static function find_all_amd_modules($debug = false) {
|
||||
public static function find_all_amd_modules($debug = false, $includelazy = false) {
|
||||
global $CFG;
|
||||
|
||||
$jsdirs = array();
|
||||
@@ -118,8 +119,8 @@ class core_requirejs {
|
||||
$extension = $item->getExtension();
|
||||
if ($extension === 'js') {
|
||||
$filename = str_replace('.min', '', $item->getBaseName('.js'));
|
||||
// We skip lazy loaded modules.
|
||||
if (strpos($filename, '-lazy') === false) {
|
||||
// We skip lazy loaded modules unless specifically requested.
|
||||
if ($includelazy || strpos($filename, '-lazy') === false) {
|
||||
$modulename = $component . '/' . $filename;
|
||||
$jsfiles[$modulename] = $item->getRealPath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user