126 lines
3.2 KiB
JavaScript
126 lines
3.2 KiB
JavaScript
require('dotenv').config();
|
|
|
|
const useBootstrap = process.env.USE_BOOTSTRAP === 'true';
|
|
|
|
const stylesPath = useBootstrap
|
|
? {
|
|
source: 'source/styles/**/*.scss',
|
|
entry: 'source/styles/main.scss',
|
|
dest: 'build/styles'
|
|
}
|
|
: {
|
|
source: 'source/assets/sass/**/*.scss',
|
|
entry: [
|
|
'source/assets/sass/main.scss'
|
|
],
|
|
dest: 'build/assets/css'
|
|
};
|
|
|
|
const scriptsPath = useBootstrap
|
|
? {
|
|
source: 'source/js/**/*.js',
|
|
extraDirs: ['source/js'], // <<< hier liegen deine .min.js
|
|
srcDir: 'source/js', // <<< sehr wichtig, NICHT "core"
|
|
entry: 'source/js/main.js',
|
|
dest: 'build/js'
|
|
}
|
|
: {
|
|
source: 'source/assets/js/**/*.js',
|
|
extraDirs: ['source/assets/js'], // <<< hier liegen deine .min.js
|
|
srcDir: 'source/assets/js', // <<< sehr wichtig, NICHT "core"
|
|
entry: 'source/assets/js/main.js',
|
|
dest: 'build/assets/js'
|
|
};
|
|
|
|
module.exports = {
|
|
useBootstrap,
|
|
|
|
paths: {
|
|
source: 'source',
|
|
build: 'build',
|
|
|
|
styles: stylesPath,
|
|
scripts: scriptsPath,
|
|
|
|
images: {
|
|
source: [
|
|
'source/images/**/*.{jpg,jpeg,png}',
|
|
'source/assets/css/images/**/*.{jpg,jpeg,png}'
|
|
],
|
|
other: [
|
|
'source/images/**/*.{gif,svg,webp,mp4,webm}',
|
|
'source/assets/css/images/**/*.{gif,svg,webp}'
|
|
],
|
|
dest: 'build/images'
|
|
},
|
|
|
|
markup: {
|
|
source: ['source/**/*.{kit,html,php}'],
|
|
entry: ['source/**/*.{kit,html,php}'],
|
|
exclude: ['source/audio/**', 'source/cli/**', 'source/inc/**', 'source/api/**' ],
|
|
dest: 'build'
|
|
},
|
|
|
|
static: {
|
|
source: [
|
|
'source/assets/**/*',
|
|
'!source/assets/sass/**/*',
|
|
'!source/assets/scss/**/*',
|
|
'!source/assets/css/**/*.css',
|
|
'!source/assets/css/images/**/*',
|
|
'!source/assets/js/*.js',
|
|
'source/assets/webfonts/**/*',
|
|
'source/robots.txt',
|
|
'source/humans.txt',
|
|
'source/audio/*',
|
|
'source/inc/*'
|
|
//'source/.env',
|
|
//'source/api/*',
|
|
//'source/admin/**/*' // 👈 hier hinzufügen
|
|
|
|
],
|
|
dest: 'build/assets'
|
|
},
|
|
|
|
vendor: {
|
|
fontawesome: useBootstrap
|
|
? null
|
|
: 'node_modules/@fortawesome/fontawesome-free/webfonts/*',
|
|
jquery: 'node_modules/jquery/dist/jquery.min.js',
|
|
scrollex: 'node_modules/jquery.scrollex/jquery.scrollex.min.js',
|
|
//scrolly: 'node_modules/jquery.scrolly/jquery.scrolly.js',
|
|
destFonts: 'build/assets/webfonts',
|
|
destJs: 'build/assets/js'
|
|
},
|
|
|
|
favicons: {
|
|
source: ['source/*.{png,ico,svg,webmanifest}'],
|
|
dest: 'build'
|
|
}
|
|
},
|
|
|
|
extensionMapping: {
|
|
'book': '.php',
|
|
'index': '.php',
|
|
//'400': '.shtml',
|
|
//'401': '.shtml',
|
|
//'403': '.shtml',
|
|
//'404': '.shtml'
|
|
},
|
|
|
|
serve: {
|
|
proxy: 'https://woodenwire.localhost',
|
|
port: 3000,
|
|
open: true,
|
|
https: {
|
|
key: '/opt/home/patrick/certs/woodenwire.localhost-key.pem',
|
|
cert: '/opt/home/patrick/certs/woodenwire.localhost.pem'
|
|
}
|
|
},
|
|
deploy: {
|
|
host: 'woodenwire@10.247.64.14',
|
|
path: '/home/woodenwire/htdocs/woodenwire.de',
|
|
port: 2222,
|
|
excludes: ['.DS_Store', '.git', '.env']
|
|
}
|
|
}; |