From 7742bbb9d002beed3a4c86e63ee3dc74c631839c Mon Sep 17 00:00:00 2001 From: Chauncey McAskill Date: Tue, 29 Mar 2022 18:47:53 -0400 Subject: [PATCH] Add block comments to task iteratees --- build/tasks/concats.js | 9 +++++++++ build/tasks/scripts.js | 11 +++++++++++ build/tasks/styles.js | 9 +++++++++ build/tasks/svgs.js | 9 +++++++++ build/tasks/versions.js | 11 +++++++++++ 5 files changed, 49 insertions(+) diff --git a/build/tasks/concats.js b/build/tasks/concats.js index ee81a3e..029e443 100644 --- a/build/tasks/concats.js +++ b/build/tasks/concats.js @@ -86,6 +86,15 @@ export default async function concatFiles(globOptions = null, concatOptions = nu concatOptions = merge({}, defaultConcatOptions, concatOptions); } + /** + * @async + * @param {object} entry - The entrypoint to process. + * @param {string[]} entry.includes - One or more paths to process. + * @param {string} entry.outfile - The file to write to. + * @param {?string} [entry.label] - The task label. + * Defaults to the outfile name. + * @return {Promise} + */ loconfig.tasks.concats.forEach(async ({ includes, outfile, diff --git a/build/tasks/scripts.js b/build/tasks/scripts.js index 2d79f4d..2deaa5a 100644 --- a/build/tasks/scripts.js +++ b/build/tasks/scripts.js @@ -54,6 +54,17 @@ export default async function compileScripts(esBuildOptions = null) { esBuildOptions = merge({}, defaultESBuildOptions, esBuildOptions); } + /** + * @async + * @param {object} entry - The entrypoint to process. + * @param {string[]} entry.includes - One or more paths to process. + * @param {string} [entry.outdir] - The directory to write to. + * @param {string} [entry.outfile] - The file to write to. + * @param {?string} [entry.label] - The task label. + * Defaults to the outdir or outfile name. + * @throws {TypeError} If outdir and outfile are missing. + * @return {Promise} + */ loconfig.tasks.scripts.forEach(async ({ includes, outdir = '', diff --git a/build/tasks/styles.js b/build/tasks/styles.js index ab50529..e893b30 100644 --- a/build/tasks/styles.js +++ b/build/tasks/styles.js @@ -102,6 +102,15 @@ export default async function compileStyles(sassOptions = null, postcssOptions = } } + /** + * @async + * @param {object} entry - The entrypoint to process. + * @param {string[]} entry.infile - The file to process. + * @param {string} entry.outfile - The file to write to. + * @param {?string} [entry.label] - The task label. + * Defaults to the outfile name. + * @return {Promise} + */ loconfig.tasks.styles.forEach(async ({ infile, outfile, diff --git a/build/tasks/svgs.js b/build/tasks/svgs.js index fc7deae..1e140e7 100644 --- a/build/tasks/svgs.js +++ b/build/tasks/svgs.js @@ -48,6 +48,15 @@ export default async function compileSVGs(mixerOptions = null) { mixerOptions = merge({}, defaultMixerOptions, mixerOptions); } + /** + * @async + * @param {object} entry - The entrypoint to process. + * @param {string[]} entry.includes - One or more paths to process. + * @param {string} entry.outfile - The file to write to. + * @param {?string} [entry.label] - The task label. + * Defaults to the outfile name. + * @return {Promise} + */ loconfig.tasks.svgs.forEach(async ({ includes, outfile, diff --git a/build/tasks/versions.js b/build/tasks/versions.js index 1f6502c..1162710 100644 --- a/build/tasks/versions.js +++ b/build/tasks/versions.js @@ -100,6 +100,17 @@ export default async function bumpVersions(versionOptions = null) { const queue = new Map(); + /** + * @async + * @param {object} entry - The entrypoint to process. + * @param {string} entry.outfile - The file to write to. + * @param {?string} [entry.label] - The task label. + * Defaults to the outfile name. + * @param {?string} [entry.format] - The version number format. + * @param {?string} [entry.key] - The JSON field name assign the version number to. + * @param {?string|number} [entry.pretty] - The white space to use to format the JSON file. + * @return {Promise} + */ loconfig.tasks.versions.forEach(({ outfile, label = null,