Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
markusantonwolf
authored and
markusantonwolf
committed
Apr 14, 2021
1 parent
9f976bb
commit 2feb29a
Showing
87 changed files
with
10,711 additions
and
18,300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"source": { | ||
"layout": "./src/styles/layout.css", | ||
"plugin_js": ["./src/scripts/ta-*.js"], | ||
"plugin_css": "./src/styles/ta-gallery.css", | ||
"alpine_js": ["./node_modules/alpinejs/dist/alpine.js"], | ||
"plugin_alpine_js": ["./node_modules/alpinejs/dist/alpine.js", "./dist/js/ta-gallery.js"], | ||
"views": ["./src/views/index.html"] | ||
}, | ||
"name": { | ||
"alpine_js": "alpine.js", | ||
"plugin_js": "ta-gallery.js", | ||
"plugin_alpine_js": "alpine-ta-gallery.js" | ||
}, | ||
"purge": { | ||
"content": ["./public/*.html","./src/snippets/*.html","./src/views/*.html"] | ||
}, | ||
"destination": { | ||
"layout": "./dist/css", | ||
"plugin_css": "./dist/css", | ||
"plugin_css_anim": "./dist/css", | ||
"alpine_js": "./dist/js", | ||
"plugin_js": "./dist/js", | ||
"plugin_alpine_js": "./dist/js", | ||
"views": "./public" | ||
}, | ||
"distribution": { | ||
"styles": ["./dist/css/**/*.css"], | ||
"scripts": ["./dist/js/**/*.js"] | ||
}, | ||
"public": { | ||
"styles": "./public/css", | ||
"scripts": "./public/js" | ||
}, | ||
"watch": { | ||
"styles": "./src/styles/*.css", | ||
"scripts": "./src/scripts/*.js", | ||
"views": "./src/views/*.html", | ||
"snippets": "./src/snippets/*.html" | ||
}, | ||
"clean": ["./dist", "./public/css", "./public/js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
const { src } = require('gulp') | ||
const config = require('config') | ||
const { src } = require('gulp') | ||
const clean = require('gulp-clean') | ||
|
||
const STYLES_DISTRIBUTION = config.get('gulp.styles.distribution') | ||
const STYLES_DESTINATION = config.get('gulp.styles.destination') | ||
const SCRIPTS_DISTRIBUTION = config.get('gulp.scripts.distribution') | ||
const SCRIPTS_DESTINATION = config.get('gulp.scripts.destination') | ||
const CLEAN = config.get('clean') | ||
|
||
const fnc_delete = function () { | ||
return src( | ||
[ | ||
STYLES_DISTRIBUTION + '/**/*', | ||
STYLES_DESTINATION + '/**/*', | ||
SCRIPTS_DISTRIBUTION + '/**/*', | ||
SCRIPTS_DESTINATION + '/**/*', | ||
], | ||
{ | ||
read: false, | ||
} | ||
).pipe(clean()) | ||
module.exports.clean = () => { | ||
return src(CLEAN, { | ||
read: false, | ||
allowEmpty: true, | ||
}).pipe(clean()) | ||
} | ||
|
||
module.exports.clean = fnc_delete |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
const { src, dest, parallel } = require('gulp') | ||
const config = require('config') | ||
const { src, dest, parallel } = require('gulp') | ||
const print = require('gulp-print').default | ||
|
||
const STYLES_DISTRIBUTION = config.get('gulp.styles.distribution') | ||
const STYLES_DESTINATION = config.get('gulp.styles.destination') | ||
const SCRIPTS_DISTRIBUTION = config.get('gulp.scripts.distribution') | ||
const SCRIPTS_DESTINATION = config.get('gulp.scripts.destination') | ||
const DISTRIBUTION_STYLES = config.get('distribution.styles') | ||
const DISTRIBUTION_SCRIPTS = config.get('distribution.scripts') | ||
const PUBLIC_SCRIPTS = config.get('public.scripts') | ||
const PUBLIC_STYLES = config.get('public.styles') | ||
|
||
const fnc_styles_copy = function () { | ||
return src([STYLES_DISTRIBUTION + '/**/*.css']) | ||
.pipe(dest(STYLES_DESTINATION)) | ||
.pipe(print()) | ||
const copy_css = () => { | ||
return src(DISTRIBUTION_STYLES, { | ||
allowEmpty: true, | ||
}) | ||
.pipe(dest(PUBLIC_STYLES)) | ||
.pipe(print()) | ||
} | ||
|
||
const fnc_scripts_copy = function () { | ||
return src([SCRIPTS_DISTRIBUTION + '/**/*.js']) | ||
.pipe(dest(SCRIPTS_DESTINATION)) | ||
.pipe(print()) | ||
const copy_js = () => { | ||
return src(DISTRIBUTION_SCRIPTS, { | ||
allowEmpty: true, | ||
}) | ||
.pipe(dest(PUBLIC_SCRIPTS)) | ||
.pipe(print()) | ||
} | ||
|
||
module.exports.styles_copy = fnc_styles_copy | ||
module.exports.scripts_copy = fnc_scripts_copy | ||
module.exports.copy = parallel(fnc_styles_copy, fnc_scripts_copy) | ||
module.exports.copy = parallel(copy_css, copy_js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const config = require('config') | ||
const { src, dest } = require('gulp') | ||
const fileinclude = require('gulp-file-include') | ||
|
||
const SOURCE_VIEWS = config.get('source.views') | ||
const DESTINATION_VIEWS = config.get('destination.views') | ||
|
||
module.exports.html = () => { | ||
return src(SOURCE_VIEWS) | ||
.pipe( | ||
fileinclude({ | ||
prefix: '@@', | ||
basepath: '@file', | ||
}) | ||
) | ||
.pipe(dest(DESTINATION_VIEWS)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,64 @@ | ||
const { dest, src, parallel } = require('gulp') | ||
const concat = require('gulp-concat') | ||
const touch = require('gulp-touch-fd') | ||
const config = require('config') | ||
const uglify = require('gulp-uglify-es').default | ||
const { src, dest, parallel, series } = require('gulp') | ||
const concat = require('gulp-concat') | ||
const babel = require('gulp-babel') | ||
const { getFiles } = require('./_tools') | ||
|
||
const SCRIPTS_BASE = config.get('gulp.scripts.base') | ||
const SCRIPTS_DISTRIBUTION = config.get('gulp.scripts.distribution') | ||
const ALPINEJS_BASE = config.get('gulp.alpinejs.base') | ||
const ALPINEJS_DISTRIBUTION = config.get('gulp.alpinejs.distribution') | ||
const minify = require('gulp-minify') | ||
|
||
const scripts_bundle = getFiles(SCRIPTS_BASE) | ||
scripts_bundle.forEach((obj) => { | ||
obj.dest = SCRIPTS_DISTRIBUTION | ||
}) | ||
const SOURCE_ALPINE = config.get('source.alpine_js') | ||
const NAME_ALPINE = config.get('name.alpine_js') | ||
const DESTINATION_ALPINE = config.get('destination.alpine_js') | ||
|
||
const scripts_alpinejs = getFiles(ALPINEJS_BASE) | ||
scripts_alpinejs.forEach((obj) => { | ||
scripts_bundle.push({ | ||
src: obj.src, | ||
name: obj.name, | ||
dest: ALPINEJS_DISTRIBUTION, | ||
}) | ||
}) | ||
const SOURCE_PLUGIN_JS = config.get('source.plugin_js') | ||
const NAME_PLUGIN_JS = config.get('name.plugin_js') | ||
const DESTINATION_PLUGIN_JS = config.get('destination.plugin_js') | ||
|
||
const fnc_scripts_develop = new Array() | ||
const fnc_scripts_build = new Array() | ||
const SOURCE_PLUGIN_ALPINE_JS = config.get('source.plugin_alpine_js') | ||
const NAME_PLUGIN_ALPINE_JS = config.get('name.plugin_alpine_js') | ||
const DESTINATION_PLUGIN_ALPINE_JS = config.get('destination.plugin_alpine_js') | ||
|
||
scripts_bundle.forEach((obj) => { | ||
fnc_scripts_develop.push(function scripts_develop() { | ||
return src(obj.src) | ||
.pipe(concat(obj.name)) | ||
.pipe( | ||
babel({ | ||
presets: ['@babel/env'], | ||
}) | ||
) | ||
.pipe(dest(obj.dest)) | ||
.pipe(touch()) | ||
}) | ||
fnc_scripts_build.push(function scripts_build() { | ||
return src(obj.src) | ||
.pipe(concat(obj.name)) | ||
.pipe( | ||
babel({ | ||
presets: ['@babel/env'], | ||
}) | ||
) | ||
.pipe(uglify()) | ||
.pipe(dest(obj.dest)) | ||
.pipe(touch()) | ||
}) | ||
}) | ||
|
||
if (fnc_scripts_develop.length > 1) { | ||
module.exports.scripts_develop = parallel(fnc_scripts_develop) | ||
} else { | ||
module.exports.scripts_develop = fnc_scripts_develop | ||
const alpine_js = () => { | ||
return src(SOURCE_ALPINE) | ||
.pipe(concat(NAME_ALPINE)) | ||
.pipe( | ||
minify({ | ||
ext: { | ||
min: '.min.js', | ||
}, | ||
ignoreFiles: ['.min.js'], | ||
}) | ||
) | ||
.pipe(dest(DESTINATION_ALPINE)) | ||
} | ||
const ta_script = () => { | ||
return src(SOURCE_PLUGIN_JS) | ||
.pipe( | ||
babel({ | ||
presets: ['@babel/env'], | ||
}) | ||
) | ||
.pipe(concat(NAME_PLUGIN_JS)) | ||
.pipe( | ||
minify({ | ||
ext: { | ||
min: '.min.js', | ||
}, | ||
ignoreFiles: ['.min.js'], | ||
}) | ||
) | ||
.pipe(dest(DESTINATION_PLUGIN_JS)) | ||
} | ||
if (fnc_scripts_build.length > 1) { | ||
module.exports.scripts_build = parallel(fnc_scripts_build) | ||
} else { | ||
module.exports.scripts_build = fnc_scripts_build | ||
const ta_script_alpine = () => { | ||
return src(SOURCE_PLUGIN_ALPINE_JS) | ||
.pipe(concat(NAME_PLUGIN_ALPINE_JS)) | ||
.pipe( | ||
minify({ | ||
ext: { | ||
min: '.min.js', | ||
}, | ||
ignoreFiles: ['.min.js'], | ||
}) | ||
) | ||
.pipe(dest(DESTINATION_PLUGIN_ALPINE_JS)) | ||
} | ||
|
||
module.exports.scripts = series(parallel(alpine_js, ta_script), ta_script_alpine) |
Oops, something went wrong.