微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

jingo 模块化的JavaScript管理

程序名称:jingo

授权协议: 未知

操作系统: 跨平台

开发语言: JavaScript

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/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐