Generate symbols before exports

This commit is contained in:
Tim Schaub
2014-04-11 12:12:35 -06:00
parent fe5d8712f2
commit 88e41f25ea
3 changed files with 117 additions and 82 deletions
+13 -3
View File
@@ -197,18 +197,22 @@ function writeSymbols(symbols, output, callback) {
* @param {function(Error)} callback Called when the symbols file has been
* written (or if an error occurs).
*/
exports.main = function(callback) {
function main(callback) {
async.waterfall([
readSymbols,
getNewer,
spawnJSDoc,
writeSymbols
], callback);
};
}
/**
* If running this module directly, read the config file and call the main
* function.
*/
if (require.main === module) {
exports.main(function(err) {
main(function(err) {
if (err) {
console.error(err.message);
process.exit(1);
@@ -217,3 +221,9 @@ if (require.main === module) {
}
});
}
/**
* Export main function.
*/
module.exports = main;