mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 15:08:37 +00:00
19 lines
525 B
TypeScript
19 lines
525 B
TypeScript
import { task, src, dest } from 'gulp';
|
|
import { packagePaths } from '../config';
|
|
|
|
/**
|
|
* Copies assets like Readme.md or LICENSE from the project base path
|
|
* to all the packages.
|
|
*/
|
|
function copyMisc(): NodeJS.ReadWriteStream {
|
|
const miscFiles = src(['Readme.md', 'LICENSE', '.npmignore']);
|
|
// Since `dest()` does not take a string-array, we have to append it
|
|
// ourselves
|
|
return packagePaths.reduce(
|
|
(stream, packagePath) => stream.pipe(dest(packagePath)),
|
|
miscFiles,
|
|
);
|
|
}
|
|
|
|
task('copy-misc', copyMisc);
|