Review main Merged

18924[FEATURE] Add RequireJS to dynamically load JS files

Benni Mack CR +2 V +2 Expert +2155 −4 updated 06/03/13, 20:49

Commit message

Adds the JS loader "RequireJS" to the TYPO3 core, accessible
for the TYPO3 Frontend and Backend in the PageRenderer
class.

Additionally, defined AMD modules can be loaded
by RequireJS on page load. This way, the whole JS code
in the core can be moved to standard AMD modules
with dependencies.

The shipped jQuery version already puts itself in a AMD
module named "jquery", so it can be used in all AMD
modules.

All created AMD modules should be named
"TYPO3/CMS/[PackageName]/[ModuleName]" so the
file name is resolved automatically as
"EXT:PackageName/Resources/Public/JavaScript/ModuleName.js"

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3