Skip to content

Commit

Permalink
Make docs data serialization stable so that diffs are viable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashko Stubailo committed Feb 12, 2015
1 parent d117ba2 commit e622686
Show file tree
Hide file tree
Showing 4 changed files with 5,763 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/client/.gitattributes

This file was deleted.

5,759 changes: 5,758 additions & 1 deletion docs/client/data.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions scripts/admin/jsdoc/docdata-jsdoc-template/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var helper = require('jsdoc/util/templateHelper');

var _ = require("underscore");
var stringify = require("canonical-json");

var names = [];
var dataContents = {};
Expand Down Expand Up @@ -107,14 +108,14 @@
});

// write full docs JSON
var jsonString = JSON.stringify(dataContents);
var jsonString = stringify(dataContents, null, 2);
var jsString = "DocsData = " + jsonString + ";";
jsString = "// This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh\n" + jsString;
var docsDataFilename = "docs/client/data.js";
fs.writeFileSync(docsDataFilename, jsString);

// write name tree JSON
jsonString = JSON.stringify(names.sort(), null, 2);
jsonString = stringify(names.sort(), null, 2);
var nameTreeFilename= "docs/client/names.json";
fs.writeFileSync(nameTreeFilename, jsonString);
};
Expand Down
3 changes: 2 additions & 1 deletion scripts/admin/jsdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"readme": "no warn",
"repository": "no warn",
"dependencies": {
"jsdoc": "3.3.0-alpha9"
"jsdoc": "3.3.0-alpha9",
"canonical-json": "0.0.4"
}
}

0 comments on commit e622686

Please sign in to comment.