generated from Seekra/repository-template
Feat(legal): legal notice #8
@@ -30,8 +30,10 @@ const validateArtifact = function validateArtifact (artifact) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else if (artifact.type === 'copy') {
|
} else if (artifact.type === 'copy') {
|
||||||
if (!artifact.options) return false;
|
if (!artifact.options) return true;
|
||||||
|
else if (Object.hasOwn(artifact.options), 'source') {
|
||||||
return typeof artifact.options.source === 'string';
|
return typeof artifact.options.source === 'string';
|
||||||
|
} else return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,7 +57,12 @@ export const processArtifact = async function processArtifact (artifact, { srcBa
|
|||||||
);
|
);
|
||||||
console.log(`Wrote to ${distPath}`);
|
console.log(`Wrote to ${distPath}`);
|
||||||
} else if (artifact.type === 'copy') {
|
} else if (artifact.type === 'copy') {
|
||||||
const srcPath = join(srcBase, artifact.options.source);
|
const srcPath = join(
|
||||||
|
srcBase,
|
||||||
|
artifact.options
|
||||||
|
? (artifact.options.source ?? artifact.path)
|
||||||
|
: artifact.path
|
||||||
|
);
|
||||||
await cp(
|
await cp(
|
||||||
srcPath,
|
srcPath,
|
||||||
distPath,
|
distPath,
|
||||||
|
|||||||
Reference in New Issue
Block a user