Added in contact section #12

Merged
rodude123 merged 18 commits from contact into master 2022-01-11 20:58:54 +00:00
2 changed files with 23 additions and 7 deletions
Showing only changes of commit a7cc4f4a45 - Show all commits

View File

@ -15,6 +15,7 @@ jobs:
- name: 🔨Run Gulp - name: 🔨Run Gulp
run: | run: |
export github="true"
npm install npm install
npm start npm start

View File

@ -6,10 +6,12 @@ const terser = require("gulp-terser");
const ftp = require("vinyl-ftp"); const ftp = require("vinyl-ftp");
const env = require("gulp-env"); const env = require("gulp-env");
env({ /*env({
file: ".env", file: ".env",
type: ".ini" type: ".ini"
}); });*/
const github = (process.env.github) ? true : false;
gulp.task("minifyHTML", () => gulp.task("minifyHTML", () =>
{ {
@ -57,7 +59,7 @@ gulp.task("watchFiles", () =>
gulp.watch("src/api/*.php", gulp.task("movePHPFiles")) gulp.watch("src/api/*.php", gulp.task("movePHPFiles"))
}); });
gulp.task("ftp", () => /*gulp.task("ftp", () =>
{ {
let conn = ftp.create( let conn = ftp.create(
{ {
@ -69,12 +71,12 @@ gulp.task("ftp", () =>
return gulp.src("dist/**", {base: "dist", dot: true}) return gulp.src("dist/**", {base: "dist", dot: true})
.pipe(conn.newerOrDifferentSize("/")) .pipe(conn.newerOrDifferentSize("/"))
.pipe(conn.dest("/")); .pipe(conn.dest("/"));
}); });*/
gulp.task("deploy", () => /*gulp.task("deploy", () =>
{ {
gulp.watch("dist", gulp.task("ftp")); gulp.watch("dist", gulp.task("ftp"));
}); });*/
gulp.task("browserSync", () => gulp.task("browserSync", () =>
{ {
@ -89,4 +91,17 @@ gulp.task("browserSync", () =>
gulp.watch("dist").on("change", browserSync.reload) gulp.watch("dist").on("change", browserSync.reload)
}); });
gulp.task("default", gulp.series(gulp.parallel("watchFiles", "browserSync"))); gulp.task("default", () =>
{
if(github)
{
(gulp.series("movePHPFiles", "minifyJS", "minifyHTML", "minifyCSS")());
}
else
{
(gulp.series("watchFiles", "browserSync")());
}
}
//gulp.task("default", gulp.series(gulp.parallel("watchFiles", "browserSync")));