jingo 介绍
Jingo provides similar functionality to the “import” features of Java and
Python.
实例代码
jingo.declare({ require: [ 'hallmart.util.iterators', 'hallmart.Store' ], name: 'hallmart.app', as: function() { // a local alias that does not pollute the global namespace var each = hallmart.util.iterators.each; var customers = [ {name: 'Bil'}, {name: 'Ted'}, {name: 'Joe'} ]; var store = new hallmart.Store(); each(customers, function(index, value) { store.admit(value); }); } }); <html> <head> <title>The HallMart Example</title> <script type=text/javascript src=scripts/jingo.js></script> <script type=text/javascript> jingo.anonymous({require: ['hallmart.app']}); </script> </head> <body> <p>The HallMart Example</p> </body> </html>
jingo 官网
http://code.google.com/p/jingo/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。