feat: conditionally include files (#42205)
Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7b65909522
commit
440169a7cb
@ -87,6 +87,16 @@ function setExt(ext, poly) {
|
||||
return newPoly;
|
||||
}
|
||||
|
||||
// setImportedFiles(importedFiles: String[], poly: PolyVinyl) => PolyVinyl
|
||||
function setImportedFiles(importedFiles, poly) {
|
||||
checkPoly(poly);
|
||||
const newPoly = {
|
||||
...poly,
|
||||
importedFiles: [...importedFiles]
|
||||
};
|
||||
return newPoly;
|
||||
}
|
||||
|
||||
// clearHeadTail(poly: PolyVinyl) => PolyVinyl
|
||||
function clearHeadTail(poly) {
|
||||
checkPoly(poly);
|
||||
@ -139,6 +149,7 @@ module.exports = {
|
||||
isPoly,
|
||||
setContent,
|
||||
setExt,
|
||||
setImportedFiles,
|
||||
compileHeadTail,
|
||||
transformContents,
|
||||
transformHeadTailAndContents
|
||||
|
Reference in New Issue
Block a user