chore: add JSDocs

This commit is contained in:
Igor Randjelovic
2020-12-08 12:07:42 +01:00
committed by Nathan Walker
parent 6817886cd7
commit ff013096f7
10 changed files with 131 additions and 0 deletions

View File

@ -7,10 +7,27 @@ import { getEntryDirPath } from './platform';
*/
export let copyRules = new Set([]);
/**
* Utility to add new copy rules. Accepts a glob. For example
* - **\/*.html - copy all .html files found in any sub dir.
* - myFolder/* - copy all files from myFolder
*
* The path is relative to the folder of the entry file
* (specified in the main field of the package.json)
*
* @param {string} glob
*/
export function addCopyRule(glob: string) {
copyRules.add(glob);
}
/**
* Utility to remove a copy rule. The glob should be the exact glob
* to remove. For example
* - fonts/** - to remove the default copy rule for fonts
*
* @param {string} glob
*/
export function removeCopyRule(glob: string) {
copyRules.delete(glob);
}