Skip to content

Instantly share code, notes, and snippets.

@cybrown
Created June 15, 2013 11:08
Show Gist options
  • Save cybrown/5787774 to your computer and use it in GitHub Desktop.
Save cybrown/5787774 to your computer and use it in GitHub Desktop.
Base RequireJS app
require(['module1', 'module2'], function (Module1, Module2) {
'use strict';
// Main Application code here, use Module1 and Module2
});
define(['module3', 'module4'], function (Module3, Module4) {
'use strict';
// Use Module3 and Module4
var Module1 = function () {
// Write module
};
return Module1;
});
<html>
<head>
<title>Base requireJS app</title>
<script data-main="js/main" src="js/require.js"></script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment