hotfix for recursive failures in the jQuery build. v1.0.2

This commit is contained in:
Spencer Alger
2013-12-19 20:55:34 -07:00
parent d1e7b86a7d
commit f5c8d39876
5 changed files with 26 additions and 15 deletions

View File

@ -15,6 +15,7 @@ module.exports = function (done) {
var files; // populated in readSpecFiles
var apiSpec; // populated by parseSpecFiles
var docVars; // slightly modified clone of apiSpec for the docs
// generate the API
async.series([
@ -22,6 +23,7 @@ module.exports = function (done) {
parseSpecFiles,
writeApiFile,
ensureDocsDir,
formatDocVars,
writeMethodList,
writeMethodDocs
], done);
@ -88,10 +90,21 @@ module.exports = function (done) {
});
}
function formatDocVars(done) {
// merge the actions and proxies to make
// itteration easir and keep them in order
docVars = _.omit(apiSpec, 'proxies');
docVars.actions = _.sortBy(
[].concat(apiSpec.actions).concat(apiSpec.proxies),
'name'
);
done();
}
function writeMethodList(done) {
fs.writeFile(
'../../docs/_method_list.jade',
templates.apiMethodList(apiSpec),
templates.apiMethodList(docVars),
done
);
}
@ -99,7 +112,7 @@ module.exports = function (done) {
function writeMethodDocs(done) {
fs.writeFile(
'../../docs/_methods.jade',
templates.apiMethods(apiSpec),
templates.apiMethods(docVars),
done
);
}

View File

@ -4,18 +4,16 @@ var actionId = action.name.toLowerCase().replace(/[^\w]+/g, '-');
%>
h2#<%= actionId %>.fn
span.name <%= action.name %>
span.args (params, [callback])
h2#<%= actionId %>.fn <%= action.name %>(params, [callback])
include _descriptions/<%= action.name %>.jade
a.esdoc(href="<%= action.docUrl %>", title="<%= action.name %> at elasticsearch.org").
<%= action.docUrl %>
p.tight.
p.
The default method is <code><%= action.spec.method || 'GET' %></code> and
the usual <a href="#api-conventions">params and return values</a> apply.
See <a href="<%= action.docUrl %>" title="<%= action.name %>
at elasticsearch.org"><%= action.docUrl %></a> for more about this method.
include _examples/<%= action.name %>.jade
<% if (_.size(action.allParams)) { %>
h3 Params:
h3 Params
dl.params.api
<% _.each(action.allParams, function (param, paramName) { %>
dt: dfn: code <%= paramWithDefault(paramName, param.default) %>
@ -23,7 +21,7 @@ dl.params.api
<span class="types"><%= paramType(param.type) %></span>
<%= indent(param.description || '', 4) %><%
}); %>
<% } %>
include _examples/<%= action.name %>.jade<%
<% }
});
%>