Copy source files to new destination and use that destination as new source (evacuated from NSA/Microsoft)

Klaas Cuvelier 2f135066cf Migrate to CircleCI 2.0 (#26) %!s(int64=6) %!d(string=hai) anos
.circleci 2f135066cf Migrate to CircleCI 2.0 (#26) %!s(int64=6) %!d(string=hai) anos
example d812177aa2 add some example data %!s(int64=8) %!d(string=hai) anos
lib ddd05a4df4 Replace deprecated dependency gulp-util %!s(int64=6) %!d(string=hai) anos
test c7767784a4 Add some tests %!s(int64=8) %!d(string=hai) anos
.eslintrc 216f00a59c Updates %!s(int64=7) %!d(string=hai) anos
.gitignore 1e69d09177 add example to repo %!s(int64=8) %!d(string=hai) anos
CHANGELOG.md 433c9767ab Bump version %!s(int64=6) %!d(string=hai) anos
LICENSE bc0d1dfc64 Initial commit %!s(int64=10) %!d(string=hai) anos
README.md ff8ff0cc4c fix syntax highlighting %!s(int64=7) %!d(string=hai) anos
index.js 4caa55518c Move logic to lib %!s(int64=8) %!d(string=hai) anos
package-lock.json ddd05a4df4 Replace deprecated dependency gulp-util %!s(int64=6) %!d(string=hai) anos
package.json 433c9767ab Bump version %!s(int64=6) %!d(string=hai) anos

README.md

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/';

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

Updates

See changelog for all updates.