generated from Seekra/repository-template
Feat(legal): legal notice #8
@@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { checkFileReadAccess, exists, isDirectory } from './fileAccess.js';
|
import { checkFileReadAccess, exists, isDirectory } from './fileAccess.js';
|
||||||
import { copyFile, mkdir, writeFile } from 'node:fs/promises';
|
import { cp, mkdir, writeFile } from 'node:fs/promises';
|
||||||
import { dirname, join } from 'node:path';
|
import { dirname, join } from 'node:path';
|
||||||
|
|
||||||
const validateArtifact = function validateArtifact (artifact) {
|
const validateArtifact = function validateArtifact (artifact) {
|
||||||
@@ -71,9 +71,13 @@ 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.source);
|
||||||
await copyFile(
|
await cp(
|
||||||
srcPath,
|
srcPath,
|
||||||
distPath
|
distPath,
|
||||||
|
{
|
||||||
|
recursive: true,
|
||||||
|
force: true
|
||||||
|
}
|
||||||
);
|
);
|
||||||
console.log(`Copied ${srcPath} -> ${distPath}`);
|
console.log(`Copied ${srcPath} -> ${distPath}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user