RequireJS Plugin (order.js)

http://requirejs.org/

Ich habe vor kurzem require.js 2.0 heruntergeladen und es wird eine Fehlermeldung in meiner Konsole angezeigt:

Uncaught TypeError: Object function (){var g=ga.call(arguments,0),e;if(f&&v(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return b.apply(null,g)} has no method 'nameToUrl'

Wird das order.js-Plugin noch von requirejs unterstützt? Ich sehe die Dokumentation auf der Website nicht.

Wenn ich versuche, die Datei zu entfernen, bricht das Skript ab.

In meiner Indexdatei habe ich im head-Abschnitt das Skript requirejs eingefügt:

<!DOCTYPE html>
<html>
    <head>
        <title>
            My Mobile Application
        </title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
        <link rel="stylesheet" href="public/css/style.css" />
        <script data-main="scripts/main.js" src="scripts/require.js"></script>
    </head>
    <body></body>
</html>

Dann in meiner main.js Datei:

requirejs.config({
    //By default load any module IDs from js/lib
    baseUrl: 'js/lib',
    //except, if the module ID starts with "app",
    //load it from the js/app directory. paths
    //config is relative to the baseUrl, and
    //never includes a ".js" extension since
    //the paths config could be for a directory.
    paths: {
        app: '../app',
        assets: '../assets',
        views: '../app/views',
        templates: '../app/templates',
        collections: '../app/collections',
        models: '../app/models'
    }
});

// Start the main app logic.
requirejs([
    'jquery/jquery',
    'assets/jqm.config',
    'jquery/mobile',
    'text'
]);

require([
    'app'
    ],
    function( App ){
        $(document).ready( function(){
            App.initialize();
        });
    }
);

Ich sorge dafür, dass App.initialize keine Fehler aufweist und was App.initialize tut, ist nur eine einfache geografische Lokalisierung. Die requirejs fragen einfach nach order.js, und wenn ich den Code eingebe, hat er den gleichen Fehler wie oben erwähnt.

Vielen Dank!

Antworten auf die Frage(2)

Ihre Antwort auf die Frage