diff --git a/gulpfile.js b/gulpfile.js index 6f2156226d658401c8c52016fe8d023d6c886f50..d8d3af70af36edeff436ab777cb18987fc8f69f7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,6 +6,7 @@ const replace = require("gulp-replace"); const zip = require("gulp-zip"); const del = require("del"); const fs = require("fs"); +const path = require("path"); const dir = { src: ".", @@ -14,7 +15,12 @@ const dir = { // PHP settings const php = { - src: [dir.src + "/**/*.php", "!node_modules/**", "!release/**"], + src: [ + dir.src + "/**/*.php", + "!node_modules/**", + "!release/**", + "!build/**", + ], build: dir.build, }; @@ -38,7 +44,12 @@ function copyPHP() { ) ) .pipe(replace("Version: 1.0", `Version: ${version}`)) - .pipe(gulp.dest(php.build)); + .pipe( + gulp.dest(function (file) { + file.path = path.basename(file.path); + return php.build; + }) + ); } function copyWebpackContent() {