当前位置: 软件>JavaScript软件
模块化的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 va...
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);
});
}
});
The HallMart Example
jingo.anonymous({require: ['hallmart.app']});
The HallMart Example