wishthis/node_modules/gulp-copy
2022-04-08 12:55:35 +02:00
..
.circleci Add production dependencies 2022-01-21 09:28:41 +01:00
example Add production dependencies 2022-01-21 09:28:41 +01:00
lib Add production dependencies 2022-01-21 09:28:41 +01:00
node_modules/.bin Install yarn 2022-04-08 12:55:35 +02:00
test/spec Add production dependencies 2022-01-21 09:28:41 +01:00
.eslintrc Add production dependencies 2022-01-21 09:28:41 +01:00
.prettierrc Add production dependencies 2022-01-21 09:28:41 +01:00
CHANGELOG.md Add production dependencies 2022-01-21 09:28:41 +01:00
index.js Add production dependencies 2022-01-21 09:28:41 +01:00
LICENSE Add production dependencies 2022-01-21 09:28:41 +01:00
package.json Install yarn 2022-04-08 12:55:35 +02:00
README.md Add production dependencies 2022-01-21 09:28:41 +01:00

npm version build status

gulp-copy

Copy source files to new destination and use that destination as new source (for further piping). Automatically creates needed folders before proceeding. Ability to remove 'prefixes' from path.

Most likely you don't need this package for your gulp pipeline, a lot can be accomplished with just gulp.dest. A reason to use this package would be to keep some depth (prefix options).

Usage

// gulpfile.js

var gulpCopy = require('gulp-copy');
var otherGulpFunction = require('gulp-other-function');
var sourceFiles = ['source1/*', 'source2/*.txt'];
var destination = 'dest/';
var outputPath = 'some-other-dest/';

return gulp
    .src(sourceFiles)
    .pipe(gulpCopy(outputPath, options))
    .pipe(otherGulpFunction())
    .dest(destination);

Options

prefix: integer, defining how many parts of the path (separated by /) should be removed from the original path

Example

A simple implemention of a gulpfile using gulp-copy is available in the example folder. You can run gulp or npx gulp from within the folder.

Updates

See changelog for all updates.