Situation:
I currently have a small gulp task that prepares my project files for deployment via FTP. This is nothing unusual, but this simple project no longer needs to be done now.
The entire deployment task has a βsubtaskβ that simply grabs the list of paths and copies all the files to the __deploy directory:
var deployBasePath = '__deploy/'; var deployIncludePaths = [ '**/*', '.htaccess', '!{__deploy,__deploy/**}', '!{.git,.git/**}', '!assets/{js-sources,js-sources/**}', '!assets/{scss,scss/**}', '!assets/{vendor,vendor/**}', '!{node_modules,node_modules/**}', '!{panel,panel/**}', '!thumbs/**', '!.bowerrc', '!.gitignore', '!.gitmodules', '!bower.json', '!composer.{json,lock}', '!gulpfile.js', '!package.json', '!readme.md' ]; gulp.task('deploy-copy', ['deploy-cleanup', 'css', 'js'], function() { return gulp.src(deployIncludePaths) .pipe(gulp.dest(deployBasePath)); });
This will copy the project files to the __deploy directory and exclude all gulp, bower, composer configuration files, as well as SCSS and JS sources. The deploy-cleanup task that it invokes simply cleans up the deployment directory.
Problem:
There is a piece of project code that uses file modification dates to create sitemaps, etc. Unfortunately, this behavior cannot be changed.
Therefore, it would be useful if there was a way to copy files in the same way as it was done above, however, if all file modification dates (or at least files from the specified directory) are saved.
Is there any way to do this?