// Compress files from srcPath, using basePath, to outputFile in the RELEASE_DIR function compressFiles(srcPath, basePath, outputFile, zipFolder) { return gulp.src(srcPath, { base: basePath }) .pipe(rename(function(actualPath) { actualPath.dirname = path.join(zipFolder, actualPath.dirname); })) .pipe(zip(outputFile)) .pipe(gulp.dest(RELEASE_DIR)); }
gulp.task('function',()=>{ gulp.src("./src/**/hello.txt") .pipe(rename(function (path) { path.dirname += "/ciao"; path.basename += "-goodbye"; path.extname = ".md"; })) .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/hello-goodbye.md })
path.dirname = `projects/ledger-reconciler/${path.dirname}`; }),