moodle/.grunt
Andrew Nicols c1e639c41a MDL-71882 grunt: Replace module names
When a third-party AMD module is provided with an included name we must
replace it with a name that we are able to use.

The structure of an AMD module define function is:

    [name], [dependencies], [callback]
    String, Array,          Function

Each of these is (strangely) optional.

We know that the name is the only String and will always be the first,
and we can use AST to remove a provided name before adding the
Moodle-specific name.

This should be a safe change and not lead to any changes in built code,
but will make it easier to include third-party code.

An additional logging line is also included to inform developers that a
change was made.
2021-11-17 09:16:55 +08:00
..
jsdoc MDL-71113 js: Add jsdoc configuration and Grunt 2021-06-18 09:38:04 +08:00
tasks MDL-72326 grunt: Fix component library grunt on Windows 2021-10-04 13:18:08 +01:00
babel-plugin-add-module-to-define.js MDL-71882 grunt: Replace module names 2021-11-17 09:16:55 +08:00
components.js