Rename generate-symbols.js to generate-info.js

This task generates build related metadata for the library based on doc annotations.  Since it is about more than writing out exportable symbols, it makes sense to have a more general name.
This commit is contained in:
Tim Schaub
2014-05-04 15:01:17 -07:00
parent 48828a238a
commit f9157a6123
7 changed files with 12 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
{
"opts": {
"recurse": true,
"template": "buildcfg/jsdoc/symbols"
"template": "buildcfg/jsdoc/info"
},
"tags": {
"allowUnknownTags": true
@@ -10,7 +10,7 @@
"includePattern": "\\.js$"
},
"plugins": [
"buildcfg/jsdoc/symbols/define-plugin",
"buildcfg/jsdoc/symbols/todo-plugin"
"buildcfg/jsdoc/info/define-plugin",
"buildcfg/jsdoc/info/todo-plugin"
]
}

View File

@@ -5,7 +5,7 @@ var async = require('async');
var fse = require('fs-extra');
var nomnom = require('nomnom');
var generateSymbols = require('./generate-symbols');
var generateInfo = require('./generate-info');
var build = path.join(__dirname, '..', 'build');
@@ -49,18 +49,18 @@ function getPatterns(configPath, callback) {
/**
* Read the symbols file.
* Read the symbols from info file.
* @param {Array.<string>} patterns List of patterns to pass along.
* @param {funciton(Error, Array.<string>, Array.<Object>)} callback Called
* with the patterns and symbols (or any error).
*/
function getSymbols(patterns, callback) {
generateSymbols(function(err) {
generateInfo(function(err) {
if (err) {
callback(new Error('Trouble generating symbols: ' + err.message));
callback(new Error('Trouble generating info: ' + err.message));
return;
}
var symbols = require('../build/symbols.json').symbols;
var symbols = require('../build/info.json').symbols;
callback(null, patterns, symbols);
});
}

View File

@@ -7,10 +7,10 @@ var fse = require('fs-extra');
var walk = require('walk').walk;
var sourceDir = path.join(__dirname, '..', 'src', 'ol');
var infoPath = path.join(__dirname, '..', 'build', 'symbols.json');
var infoPath = path.join(__dirname, '..', 'build', 'info.json');
var jsdoc = path.join(__dirname, '..', 'node_modules', '.bin', 'jsdoc');
var jsdocConfig = path.join(
__dirname, '..', 'buildcfg', 'jsdoc', 'symbols', 'conf.json');
__dirname, '..', 'buildcfg', 'jsdoc', 'info', 'conf.json');
/**

View File

@@ -66,9 +66,9 @@ To generate a build named `ol.min.js` with the `build.json`, you would run this:
Called internally to generate a `build/exports.js` file optionally with a limited set of exports.
## `generate-symbols.js`
## `generate-info.js`
Called internally to parse the library for API annotations and write out a `build/symbols.json` file.
Called internally to parse the library for annotations and write out a `build/info.json` file.
## `parse-examples.js`