Added in contact section #12
1
.github/workflows/ftpDeploy.yml
vendored
1
.github/workflows/ftpDeploy.yml
vendored
@ -15,6 +15,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 🔨Run Gulp
|
- name: 🔨Run Gulp
|
||||||
run: |
|
run: |
|
||||||
|
export github="true"
|
||||||
npm install
|
npm install
|
||||||
npm start
|
npm start
|
||||||
|
|
||||||
|
29
gulpfile.js
29
gulpfile.js
@ -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")));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user