diff --git a/utils/convert.mjs b/utils/convert.mjs index 00987eea32..8a28b89697 100644 --- a/utils/convert.mjs +++ b/utils/convert.mjs @@ -9,9 +9,17 @@ const __dirname = path.dirname(__filename); const data = JSON.parse(fs.readFileSync(path.join(__dirname, '../docs/data.json'))); -// Strategy for HTML documentation output (maintains exact convert.mjs behavior) +// Generate documentation used in the p5.js reference. This data will get read in +// the p5.js-website repo: https://github.com/processing/p5.js-website/ const htmlStrategy = { - shouldSkipEntry: () => false, // Don't skip anything (including Foundation) + shouldSkipEntry: (entry) => + // Skip static methods on p5.Vector for now because the names clash with + // the non static versions + entry.scope === 'static' && + entry.memberof === 'Vector' && + ['add', 'sub', 'mult', 'div', 'copy', 'rem', 'rotate', 'dot', 'cross', 'dist', 'lerp', 'slerp', + 'mag', 'magSq', 'normalize', 'limit', 'setMag', 'heading', 'angleBetween', 'reflect', + 'array', 'equals'].includes(entry.name), processDescription: (desc) => descriptionString(desc), diff --git a/utils/data-processor.mjs b/utils/data-processor.mjs index 99f3c44d91..9a99b34452 100644 --- a/utils/data-processor.mjs +++ b/utils/data-processor.mjs @@ -121,7 +121,9 @@ export function processData(rawData, strategy) { continue; } - const name = entry.name || (entry.properties || [])[0]?.name; + const name = entry.name || + (entry.properties || [])[0]?.name || + entry.tags?.find(t => t.title === 'property')?.name; // Skip duplicates based on name + class combination const key = `${name}:${forEntry || 'p5'}`;