Merge pull request 'develop' (#114) from develop into main
Reviewed-on: #114
This commit is contained in:
commit
2b749960ff
3 changed files with 10 additions and 84 deletions
|
@ -9,7 +9,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: node:lts
|
image: node:lts
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Build Website
|
- name: Build Website
|
||||||
|
@ -30,7 +30,7 @@ jobs:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: which lftp || ( apk --update add lftp )
|
run: which lftp || ( apk --update add lftp )
|
||||||
- name: Deploy Website
|
- name: Deploy Website
|
||||||
run: lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./build/ dev.sp-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
|
run: lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R -e ./build/ dev.sp-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
|
||||||
env:
|
env:
|
||||||
FTP_HOST: ${{ secrets.FTP_HOST }}
|
FTP_HOST: ${{ secrets.FTP_HOST }}
|
||||||
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: which lftp || ( apk --update add lftp )
|
run: which lftp || ( apk --update add lftp )
|
||||||
- name: Deploy Website
|
- name: Deploy Website
|
||||||
run: lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./build/ sp-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
|
run: lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R -e ./build/ sp-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
|
||||||
env:
|
env:
|
||||||
FTP_HOST: ${{ secrets.FTP_HOST }}
|
FTP_HOST: ${{ secrets.FTP_HOST }}
|
||||||
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
||||||
|
|
69
gulpfile.js
69
gulpfile.js
|
@ -4,7 +4,6 @@
|
||||||
*/
|
*/
|
||||||
var settings = {
|
var settings = {
|
||||||
clean: true,
|
clean: true,
|
||||||
scripts: true,
|
|
||||||
styles: true,
|
styles: true,
|
||||||
copy: true,
|
copy: true,
|
||||||
reload: true
|
reload: true
|
||||||
|
@ -17,10 +16,6 @@ var settings = {
|
||||||
var paths = {
|
var paths = {
|
||||||
input: 'src/',
|
input: 'src/',
|
||||||
output: 'dist/',
|
output: 'dist/',
|
||||||
scripts: {
|
|
||||||
input: 'src/js/*.js',
|
|
||||||
output: 'dist/js/'
|
|
||||||
},
|
|
||||||
styles: {
|
styles: {
|
||||||
input: 'src/scss/*.scss',
|
input: 'src/scss/*.scss',
|
||||||
output: 'dist/css/'
|
output: 'dist/css/'
|
||||||
|
@ -59,17 +54,10 @@ var banner = {
|
||||||
// General
|
// General
|
||||||
var {src, dest, watch, series, parallel} = require('gulp');
|
var {src, dest, watch, series, parallel} = require('gulp');
|
||||||
var del = require('del');
|
var del = require('del');
|
||||||
var flatmap = require('gulp-flatmap');
|
|
||||||
var lazypipe = require('lazypipe');
|
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
var header = require('gulp-header');
|
var header = require('gulp-header');
|
||||||
var package = require('./package.json');
|
var package = require('./package.json');
|
||||||
|
|
||||||
// Scripts
|
|
||||||
var concat = require('gulp-concat');
|
|
||||||
var uglify = require('gulp-terser');
|
|
||||||
var optimizejs = require('gulp-optimize-js');
|
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
var sass = require('gulp-sass')(require('sass'));
|
var sass = require('gulp-sass')(require('sass'));
|
||||||
var postcss = require('gulp-postcss');
|
var postcss = require('gulp-postcss');
|
||||||
|
@ -100,62 +88,6 @@ var cleanDist = function (done) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Repeated JavaScript tasks
|
|
||||||
var jsTasks = lazypipe()
|
|
||||||
.pipe(header, banner.main, {package: package})
|
|
||||||
.pipe(optimizejs)
|
|
||||||
.pipe(dest, paths.scripts.output)
|
|
||||||
.pipe(rename, {suffix: '.min'})
|
|
||||||
.pipe(uglify)
|
|
||||||
.pipe(optimizejs)
|
|
||||||
.pipe(header, banner.main, {package: package})
|
|
||||||
.pipe(dest, paths.scripts.output);
|
|
||||||
|
|
||||||
// minify, and concatenate scripts
|
|
||||||
var buildScripts = function (done) {
|
|
||||||
// Make sure this feature is activated before running
|
|
||||||
if (!settings.scripts) return done();
|
|
||||||
|
|
||||||
// Run tasks on script files
|
|
||||||
return src(paths.scripts.input)
|
|
||||||
.pipe(flatmap(function(stream, file) {
|
|
||||||
|
|
||||||
// If the file is a directory
|
|
||||||
if (file.isDirectory()) {
|
|
||||||
|
|
||||||
// Setup a suffix variable
|
|
||||||
var suffix = '';
|
|
||||||
|
|
||||||
// If separate polyfill files enabled
|
|
||||||
if (settings.polyfills) {
|
|
||||||
|
|
||||||
// Update the suffix
|
|
||||||
suffix = '.polyfills';
|
|
||||||
|
|
||||||
// Grab files that aren't polyfills, concatenate them, and process them
|
|
||||||
src([file.path + '/*.js', '!' + file.path + '/*' + paths.scripts.polyfills])
|
|
||||||
.pipe(concat(file.relative + '.js'))
|
|
||||||
.pipe(jsTasks());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Grab all files and concatenate them
|
|
||||||
// If separate polyfills enabled, this will have .polyfills in the filename
|
|
||||||
src(file.path + '/*.js')
|
|
||||||
.pipe(concat(file.relative + suffix + '.js'))
|
|
||||||
.pipe(jsTasks());
|
|
||||||
|
|
||||||
return stream;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Otherwise, process the file
|
|
||||||
return stream.pipe(jsTasks());
|
|
||||||
|
|
||||||
}));
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// Process, and minify Sass files
|
// Process, and minify Sass files
|
||||||
var buildStyles = function (done) {
|
var buildStyles = function (done) {
|
||||||
// Make sure this feature is activated before running
|
// Make sure this feature is activated before running
|
||||||
|
@ -239,7 +171,6 @@ var watchSource = function (done) {
|
||||||
exports.default = series(
|
exports.default = series(
|
||||||
cleanDist,
|
cleanDist,
|
||||||
parallel(
|
parallel(
|
||||||
buildScripts,
|
|
||||||
buildStyles,
|
buildStyles,
|
||||||
copyFiles
|
copyFiles
|
||||||
)
|
)
|
||||||
|
|
19
package.json
19
package.json
|
@ -12,25 +12,20 @@
|
||||||
"url": "https://git.sp-codes.de/samuel-p/sp-magic.de"
|
"url": "https://git.sp-codes.de/samuel-p/sp-magic.de"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"browser-sync": "^2.29.3"
|
"browser-sync": "^3.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "10.4.16",
|
"autoprefixer": "10.4.19",
|
||||||
"cssnano": "6.0.1",
|
"cssnano": "6.1.2",
|
||||||
"del": "6.1.1",
|
"del": "6.1.1",
|
||||||
"gulp": "4.0.2",
|
"gulp": "5.0.0",
|
||||||
"gulp-concat": "2.6.1",
|
|
||||||
"gulp-flatmap": "1.0.2",
|
|
||||||
"gulp-header": "2.0.9",
|
"gulp-header": "2.0.9",
|
||||||
"gulp-optimize-js": "1.1.0",
|
"gulp-postcss": "10.0.0",
|
||||||
"gulp-postcss": "9.0.1",
|
|
||||||
"gulp-rename": "2.0.0",
|
"gulp-rename": "2.0.0",
|
||||||
"gulp-sass": "5.1.0",
|
"gulp-sass": "5.1.0",
|
||||||
"gulp-terser": "2.1.0",
|
|
||||||
"lazypipe": "1.0.2",
|
|
||||||
"node-sass-tilde-importer": "^1.0.2",
|
"node-sass-tilde-importer": "^1.0.2",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.4.38",
|
||||||
"sass": "^1.69.5"
|
"sass": "^1.74.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
|
|
Loading…
Reference in a new issue