Skip to content
Browse files

Just some minor changes

  • Loading branch information...
1 parent c6744ac commit 17a137869b432e24ba2076ee4dd8647e57988287 @gjtorikian committed
Showing with 14 additions and 8 deletions.
  1. +1 −1 lib/panino.js
  2. +6 −0 lib/panino/cli.js
  3. +7 −7 lib/panino/plugins/parsers/jsd_parser.js
View
2 lib/panino.js
@@ -80,7 +80,6 @@ function build_tree(files, nodes, options) {
// If found, rename ".Ajax.Updater" to "SECTION.Ajax.Updater"
//
-
// prepare nodes of sections
// N.B. starting with 1 we skip "" section
parted = _.keys(nodes).sort().slice(1).map(function (id) {
@@ -149,6 +148,7 @@ function build_tree(files, nodes, options) {
// parent element found. move this element to parent's children nodes,
// maintaing order
parent.children.unshift(tree[id]);
+
delete tree[id];
});
View
6 lib/panino/cli.js
@@ -242,6 +242,12 @@ cli.addArgument(['--index'], {
defaultValue: ''
});
+cli.addArgument(['--splitFromNS'], {
+ help: 'Splits the files up by their namespace',
+ dest: 'splitFromNS',
+ action: 'storeTrue',
+ defaultValue: false
+});
cli.addArgument(['--keepOutDir'], {
help: 'Does not wipe output directory before building',
View
14 lib/panino/plugins/parsers/jsd_parser.js
@@ -80,17 +80,17 @@ var process_jsd = function(source, file, options, callback) {
// grab the class name out (if it exists)
remainingNodes = _.reject(merged, function(i) {
if (i["tagname"] === "class") {
- classPrefix = i["name"];
- nodes[classPrefix] = createBasicTranslation(classPrefix, "class", i, options);
+ classPrefix = i["name"];
+ nodes[classPrefix] = createBasicTranslation(classPrefix, "class", i, options);
- if (i["inherits"] !== undefined && i["inherits"].length > 0)
- nodes[classPrefix]["inherits"] = i["inherits"];
+ if (i["inherits"] !== undefined && i["inherits"].length > 0)
+ nodes[classPrefix]["inherits"] = i["inherits"];
- if (i["allowchild"] !== undefined)
- nodes[classPrefix]["allowchild"] = i["allowchild"].doc;
+ if (i["allowchild"] !== undefined)
+ nodes[classPrefix]["allowchild"] = i["allowchild"].doc;
return true;
- }
+ }
});
// esprima parsing is good--too good! remove nodes that just don't have doc,

0 comments on commit 17a1378

Please sign in to comment.
Something went wrong with that request. Please try again.