1. <p><font size="3"> "shim": {</font></p>
2. <p><font size="3"> "lib/cool-plugin": {</font></p>
3. <p><font size="3"> "deps": ["lib/jquery"]</font></p>
4. <p><font size="3"> }</font></p>
5. <p><font size="3"> }</font></p>
6. <p><font size="3"> }</font></p>
1. <p><font size="3"> define(functino(require) {</font></p>
2. <p><font size="3"> var User = function(name, greeter) {</font></p>
3. <p><font size="3"> this.name = name;</font></p>
4. <p><font size="3"> this.greeter = greeter;</font></p>
5. <p><font size="3"> };</font></p>
6. <p><font size="3"> User.prototype.sayHello = function() {</font></p>
7. <p><font size="3"> this.greeter("Hello, " + this.name);</font></p>
8. <p><font size="3"> };</font></p>
9. <p><font size="3"> var user = new User('Alice', window.alert);</font></p>
10. <p><font size="3"> user.sayHello();</font></p>
11. <p><font size="3"> });</font></p>
1. <p><font size="3"> define(functino(require) {</font></p>
2. <p><font size="3"> var User = function(name, greeter) {</font></p>
3. <p><font size="3"> this.name = name;</font></p>
4. <p><font size="3"> this.greeter = greeter;</font></p>
5. <p><font size="3"> };</font></p>
6. <p><font size="3"> User.prototype.sayHello = function() {</font></p>
7. <p><font size="3"> this.greeter("Hello, " + this.name);</font></p>
8. <p><font size="3"> };</font></p>
9. <p><font size="3"> return User;</font></p>
10. <p><font size="3"> });</font></p>
11. <p><font size="3"> ## js/my-page.js</font></p>
12. <p><font size="3"> define(functino(require) {</font></p>
13. <p><font size="3"> var User = require('js/User');</font></p>
14. <p><font size="3"> var user = new User('Alice', window.alert);</font></p>
15. <p><font size="3"> user.sayHello();</font></p>
16. <p><font size="3"> });</font></p>
1. <p><font size="3"> "shim" : {</font></p>
2. <p><font size="3"> "lib/calculator": {</font></p>
3. <p><font size="3"> "export": "Calc"</font></p>
4. <p><font size="3"> }</font></p>
5. <p><font size="3"> }</font></p>
6. <p><font size="3"> }</font></p>