First baby steps towards requirejs
parent
f5d1cd1751
commit
0e5cd65d8d
|
@ -42,6 +42,7 @@ var LIBRARY_WHITELIST = [
|
|||
, 'tinycon'
|
||||
, 'underscore'
|
||||
, 'unorm'
|
||||
, 'requirejs'
|
||||
];
|
||||
|
||||
// Rewrite tar to include modules with no extensions and proper rooted paths.
|
||||
|
|
|
@ -15,6 +15,7 @@ function loadFn(path, hookName) {
|
|||
functionName = parts[1];
|
||||
}
|
||||
|
||||
console.log(["LOADING", path]);
|
||||
var fn = require(path);
|
||||
functionName = functionName ? functionName : hookName;
|
||||
|
||||
|
|
|
@ -368,6 +368,8 @@
|
|||
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
||||
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../static/plugins/requirejs/require.js"></script>
|
||||
|
||||
<!-- Include base packages manually (this help with debugging) -->
|
||||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
||||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define"></script>
|
||||
|
@ -389,6 +391,10 @@
|
|||
require.setLibraryURI(baseURL + "javascripts/lib");
|
||||
require.setGlobalKeyPath("require");
|
||||
|
||||
requirejs.config({
|
||||
baseUrl: baseURL + "static/plugins"
|
||||
});
|
||||
|
||||
$ = jQuery = require('ep_etherpad-lite/static/js/rjquery').jQuery; // Expose jQuery #HACK
|
||||
browser = require('ep_etherpad-lite/static/js/browser').browser;
|
||||
if ((!browser.msie) && (!(browser.mozilla && browser.version.indexOf("1.8.") == 0))) {
|
||||
|
|
Loading…
Reference in New Issue