Created
February 19, 2018 22:36
-
-
Save johnkingzy/cfa6ebb454c89d7a5f41fe1563418be0 to your computer and use it in GitHub Desktop.
Gulp file that copies all /dist content and cleans the laravel public folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tasks operations - begin | |
var files = [ | |
"./../server/public/*", | |
"!./../server/public/.htaccess", | |
"!./../server/public/index.php", | |
"!./../server/public/storage", | |
"!./../server/public/favicon.ico" | |
]; | |
// remove old dist folder content from the laravel public folder | |
gulp.src(files, { read: false }).pipe(clean({ force: true })); | |
//copy newly generated dist folder contents into the laravel public folder | |
gulp | |
.src(["./dist/**/*", "!./dist/index.html", | |
"!./dist/stats.json"]) | |
.pipe(gulp.dest("./../server/public")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment