RequireJs as global function

by Sergio Sánchez

HTML

<script src="https://rawgithub.com/rniemeyer/knockout-amd-helpers/master/ext/require/require.js"></script>

JavaScript

//typically modules will be anonymous and determined by their path
//using first argument to name the module, to ease jsFiddle demo
define("one", [], function() {
    window.popupManager = (function () {
    		console.log ('aca');

        var popUpManager = function () {
            self = this;
            
            self.CallMe = function ()
            {
            	alert ('someone calls');
            };
        };
        return new popUpManager();
    })();
});
require(['one']);

window.popupManager.CallMe();