30 lines
694 B
Cheetah
30 lines
694 B
Cheetah
var ca = require('../client_action').<%
|
|
|
|
if (!clientActionModifier) print('factory');
|
|
else print('makeFactoryWithModifier(' + clientActionModifier.toString() + ')');
|
|
|
|
%>;
|
|
var namespace = require('../client_action').namespaceFactory;
|
|
var api = module.exports = {};
|
|
|
|
api._namespaces = <%= stringify(namespaces) %>;<%
|
|
|
|
_.each(actions, function (action) {
|
|
var namespace = action.location.split('.').shift();
|
|
if (_.includes(namespaces, namespace)) {
|
|
_.pull(namespaces, namespace);
|
|
%>
|
|
|
|
api.<%= namespace %> = namespace();<%
|
|
}%>
|
|
|
|
<%= _.trimEnd(partials.client_action(action)) %><%
|
|
|
|
});
|
|
|
|
_.each(proxies, function (action) {%>
|
|
|
|
<%= _.trimEnd(partials.client_action_proxy(action)) %><%
|
|
});
|
|
%>
|