Compare commits
2 Commits
1.1.1
...
79fff56a25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79fff56a25 | ||
|
|
06485c47b2 |
@@ -26,4 +26,4 @@ jobs:
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
files: |-
|
||||
*.zip
|
||||
dist/*.zip
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ vendor
|
||||
lib
|
||||
node_modules
|
||||
*.zip
|
||||
dist
|
||||
|
||||
25
.vscode/sftp.json
vendored
25
.vscode/sftp.json
vendored
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "acornfinehomes.com",
|
||||
"host": "og6.cleverogre.com",
|
||||
"protocol": "sftp",
|
||||
"port": 22,
|
||||
"username": "acornfinehomes",
|
||||
"password": "kwSSrK7nkV3J54nV2E7XcjHH",
|
||||
"privateKeyPath": "~/.ssh/id_rsa",
|
||||
"remotePath": "/home/acornfinehomes/htdocs/acornfinehomes.com/wp-content/plugins/ogre-sort/",
|
||||
"uploadOnSave": true,
|
||||
"useTempFile": false,
|
||||
"openSsh": false,
|
||||
"ignore": [
|
||||
".vscode",
|
||||
".git",
|
||||
".DS_Store",
|
||||
".gitignore",
|
||||
"composer.json",
|
||||
"composer.lock",
|
||||
"gulpfile.js",
|
||||
"Makefile",
|
||||
"package-lock.json",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
44
gulpfile.js
44
gulpfile.js
@@ -1,19 +1,37 @@
|
||||
const gulp = require('gulp'),
|
||||
const fs = require('fs'),
|
||||
gulp = require('gulp'),
|
||||
clean = require('gulp-clean'),
|
||||
path = require('path'),
|
||||
zip = require('gulp-zip').default;
|
||||
|
||||
const NAME = path.basename(__dirname);
|
||||
const PACKAGE = require('./package.json');
|
||||
const NAME = PACKAGE.name.split('/').pop();
|
||||
|
||||
// Clean Tasks
|
||||
|
||||
gulp.task('clean-package', () => {
|
||||
return gulp.src(`${NAME}.zip`, {
|
||||
gulp.task('clean-package-files', (done) => {
|
||||
if (!fs.existsSync('./dist')) return done();
|
||||
return gulp.src(`./dist/${NAME}`, {
|
||||
read: false,
|
||||
allowEmpty: true,
|
||||
}).pipe(clean());
|
||||
});
|
||||
|
||||
gulp.task('clean-package-zip', (done) => {
|
||||
if (!fs.existsSync('./dist')) return done();
|
||||
return gulp.src('./dist/*.zip', {
|
||||
read: false,
|
||||
allowEmpty: true,
|
||||
}).pipe(clean());
|
||||
});
|
||||
|
||||
gulp.task(
|
||||
'clean-package',
|
||||
gulp.series(
|
||||
'clean-package-files',
|
||||
'clean-package-zip'
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
'clean',
|
||||
gulp.series(
|
||||
@@ -23,7 +41,7 @@ gulp.task(
|
||||
|
||||
// Package Tasks
|
||||
|
||||
gulp.task('package-compress', () => {
|
||||
gulp.task('package-copy', () => {
|
||||
return gulp.src([
|
||||
'assets/**/*',
|
||||
'inc/**/*',
|
||||
@@ -35,16 +53,26 @@ gulp.task('package-compress', () => {
|
||||
], {
|
||||
base: './',
|
||||
encoding: false,
|
||||
})
|
||||
.pipe(gulp.dest(`./dist/${NAME}`));
|
||||
});
|
||||
|
||||
gulp.task('package-compress', () => {
|
||||
return gulp.src(`./dist/${NAME}/**/*`, {
|
||||
base: './dist',
|
||||
encoding: false,
|
||||
})
|
||||
.pipe(zip(`${NAME}.zip`))
|
||||
.pipe(gulp.dest('./'));
|
||||
.pipe(gulp.dest('./dist'));
|
||||
});
|
||||
|
||||
gulp.task(
|
||||
'package',
|
||||
gulp.series(
|
||||
'clean',
|
||||
'package-compress'
|
||||
'package-copy',
|
||||
'package-compress',
|
||||
'clean-package-files'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user