[FEATURE] Add RequireJS to dynamically load JS files 24/18924/5
authorBenjamin Mack <benni@typo3.org>
Thu, 14 Mar 2013 20:09:02 +0000 (21:09 +0100)
committerBenjamin Mack <benni@typo3.org>
Sat, 30 Mar 2013 11:44:33 +0000 (12:44 +0100)
commitb9129bf2d5374935760e1ac33bb7dbf1874b3ac0
tree56c35ecbcee4fdae7978e20e95e1fd118f30e303
parent61df9ce72e4150d7d01492baa8b05f6f8de2f14b
[FEATURE] Add RequireJS to dynamically load JS files

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"

Releases: 6.1
Resolves: #39622
Change-Id: I6e3177019e9b98b409aa90f771122b48cee235e1
Reviewed-on: https://review.typo3.org/18924
Reviewed-by: Wouter Wolters
Tested-by: Stefan Neufeind
Tested-by: Wouter Wolters
Reviewed-by: Daniel Sattler
Tested-by: Daniel Sattler
Reviewed-by: Stefan Neufeind
Reviewed-by: Marcus Schwemer
Tested-by: Marcus Schwemer
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/contrib/requirejs/require.js [new file with mode: 0644]
typo3/contrib/requirejs/require.min.js [new file with mode: 0644]
typo3/sysext/core/Classes/Page/PageRenderer.php