<!DOCTYPE html>
<html>
<head>
<title>My Sample Project</title>
<script data-main="main" src="scripts/require.js"></script>
</head>
<body>
<h1>My Sample Project</h1>
</body>
</html>
In your main.js file you load other scripts, for example a display.js file:require(["display"], function(util) {
sayHello('world');
});
The display.js file containing a function used in the main.js file:function sayHello(name) {
alert('Hello ' + name);
}
document.write("Hello World")
HTH,
Kent