final sweep, moved everything to _v4

This commit is contained in:
spalger
2016-05-19 14:23:33 -07:00
parent 4a77556866
commit ec06c51c5d
78 changed files with 542 additions and 542 deletions

View File

@ -12,7 +12,7 @@ api._namespaces = <%= stringify(namespaces) %>;<%
_v4.each(actions, function (action) {
var namespace = action.location.split('.').shift();
if (_.includes(namespaces, namespace)) {
_.pull(namespaces, namespace);
_v4.pull(namespaces, namespace);
%>
api.<%= namespace %> = namespace();<%

View File

@ -2,7 +2,7 @@ module.exports = {
<%
branches.forEach(function (branch, i, list) {
var req = "require('./" + _.snakeCase(branch) + "')";
var req = "require('./" + _v4.snakeCase(branch) + "')";
if (branch === utils.branches._default) {
print(" '_default': " + req + ',\n');
}

View File

@ -7,7 +7,7 @@ NOTE: This is currently the default API, but in upcoming versions that will chan
NOTE: At this time, you must opt into the <%= branch %> API by setting the `apiVersion` config parameter.
<% }
actions = _.sortBy(actions, 'namespace');
actions = _v4.sortBy(actions, 'namespace');
_v4.each(actions, function (action) {
action.index = 'api-' + action.name.toLowerCase().replace(/[^\w]+/g, '-') + branchSuffix;
@ -27,7 +27,7 @@ The default method is `<%= action.spec.method || 'GET' %>` and the usual <<api-c
<%= action.examples %>
<% if (_.size(action.allParams)) { %>
<% if (_v4.size(action.allParams)) { %>
*Params*
[horizontal]<%

View File

@ -1,5 +1,5 @@
var _ = require('../../../src/lib/utils');
// var _ = require('../../../src/lib/utils');
var utils = require('../../../grunt/utils');
var fs = require('fs');
var path = require('path');
@ -41,11 +41,10 @@ var templateGlobals = {
stringify: stringify,
_: _,
_v4: _v4,
indent: function (block, spaces) {
var indent = _.repeat(' ', spaces);
var indent = _v4.repeat(' ', spaces);
return block.split('\n').map(function (line) {
return indent + line;
}).join('\n');
@ -78,7 +77,7 @@ var templateGlobals = {
case 'list':
return 'String, String[], Boolean';
default:
return _.ucfirst(type);
return _v4.ucfirst(type);
}
},
@ -98,7 +97,7 @@ var templateGlobals = {
fs.readdirSync(path.resolve(__dirname)).forEach(function (filename) {
var name = filename.replace(/\..+$/, '');
if (name !== 'index') {
templates[name] = _.template(
templates[name] = _v4.template(
fs.readFileSync(path.resolve(__dirname, filename), 'utf8'),
{
imports: templateGlobals