Skip to content

Commit

Permalink
Smaller content changes, updated dependencies and gulp-starter-kit
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-cologne committed Jun 20, 2019
1 parent e5d58ea commit 45ca942
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 43 deletions.
65 changes: 35 additions & 30 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* @package @jr-cologne/create-gulp-starter-kit
* @author JR Cologne <[email protected]>
* @copyright 2018 JR Cologne
* @copyright 2019 JR Cologne
* @license https://github.com/jr-cologne/gulp-starter-kit/blob/master/LICENSE MIT
* @version v0.4.0-alpha
* @version v0.10.7-beta
* @link https://github.com/jr-cologne/gulp-starter-kit GitHub Repository
* @link https://www.npmjs.com/package/@jr-cologne/create-gulp-starter-kit npm package site
*
Expand All @@ -15,7 +15,7 @@
*
* The gulp configuration file.
*
* Modified for use in jr-cologne.de.
* Modified for use in @jr-cologne/jr-cologne.de.
*
*/

Expand All @@ -24,7 +24,7 @@ const gulp = require('gulp'),
plumber = require('gulp-plumber'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
minifyCss = require('gulp-clean-css'),
babel = require('gulp-babel'),
webpack = require('webpack-stream'),
uglify = require('gulp-uglify'),
Expand All @@ -35,7 +35,7 @@ const gulp = require('gulp'),
src_folder = './',
src_assets_folder = src_folder + '_app/assets/',
dist_folder = './_site/',
dist_assets_folder = dist_folder + '_app/assets/',
dist_assets_folder = dist_folder + 'assets/',
node_modules_folder = './node_modules/',
dist_node_modules_folder = dist_folder + 'node_modules/',

Expand All @@ -57,55 +57,57 @@ gulp.task('php', () => {
.pipe(gulp.dest(dist_folder + '_app'));
});

gulp.task('images', () => {
return gulp.src([ src_assets_folder + 'img/**/*.+(png|jpg|jpeg|gif|svg|ico)' ])
.pipe(plumber())
.pipe(imagemin())
.pipe(gulp.dest(dist_assets_folder + 'img'))
.pipe(browserSync.stream());
});

gulp.task('sass', () => {
return gulp.src([ src_assets_folder + 'sass/pages/*.sass', src_assets_folder + 'sass/all.sass' ])
return gulp.src([
src_assets_folder + 'sass/pages/*.sass',
src_assets_folder + 'sass/all.sass'
], { since: gulp.lastRun('sass') })
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(sass())
.pipe(autoprefixer({
browsers: [ 'last 3 versions', '> 0.5%' ]
}))
.pipe(cssnano())
.pipe(autoprefixer())
.pipe(minifyCss())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(dist_assets_folder + 'css'))
.pipe(browserSync.stream());
});

gulp.task('css', () => {
return gulp.src([ node_modules_folder + 'normalize.css/normalize.css' ])
.pipe(autoprefixer({ browsers: ['last 3 versions', '> 0.5%'] }))
.pipe(cssnano())
.pipe(autoprefixer())
.pipe(minifyCss())
.pipe(gulp.dest(node_modules_folder + 'normalize.css'))
.pipe(browserSync.stream());
});

gulp.task('js', () => {
return gulp.src([ src_assets_folder + 'js/**/*.js' ])
return gulp.src([ src_assets_folder + 'js/**/*.js' ], { since: gulp.lastRun('js') })
.pipe(plumber())
.pipe(webpack({
mode: 'production'
}))
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(babel({
presets: [ '@babel/env' ]
}))
.pipe(uglify())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(dist_assets_folder + 'js'))
.pipe(browserSync.stream());
});

gulp.task('images', () => {
return gulp.src([ src_assets_folder + 'img/**/*.+(png|jpg|jpeg|gif|svg|ico)' ], { since: gulp.lastRun('images') })
.pipe(plumber())
.pipe(imagemin())
.pipe(gulp.dest(dist_assets_folder + 'img'))
.pipe(browserSync.stream());
});

gulp.task('vendor-assets', () => {
gulp.src([ src_assets_folder + 'vendor/highlightjs/**/*.css' ], { 'base': src_assets_folder + 'vendor' })
.pipe(autoprefixer({ browsers: ['last 3 versions', '> 0.5%'] }))
.pipe(cssnano())
.pipe(autoprefixer())
.pipe(minifyCss())
.pipe(gulp.dest(dist_assets_folder + 'vendor'));
gulp.src([ src_assets_folder + 'vendor/highlightjs/**/*.js' ], { 'base': src_assets_folder + 'vendor' })
.pipe(uglify())
Expand All @@ -122,28 +124,31 @@ gulp.task('vendor', () => {
});
}

return gulp.src(node_dependencies.map(dependency => node_modules_folder + dependency + '/**/*.*'), { base: node_modules_folder })
return gulp.src(node_dependencies.map(dependency => node_modules_folder + dependency + '/**/*.*'), {
base: node_modules_folder,
since: gulp.lastRun('vendor')
})
.pipe(gulp.dest(dist_node_modules_folder))
.pipe(browserSync.stream());
});

gulp.task('build', gulp.series('jekyll', 'php', 'images', 'sass', 'css', 'js', 'vendor-assets', 'vendor'));
gulp.task('build', gulp.series('jekyll', 'php', 'sass', 'js', 'images', 'vendor-assets', 'vendor'));

gulp.task('dev', gulp.series('jekyll', 'php', 'sass', 'js'));

gulp.task('serve', () => {
return browserSync.init({
server: {
baseDir: [ '_site' ],
port: 3000
baseDir: [ dist_folder ]
},
open: false
port: 3000,
open: false,
});
});

gulp.task('watch', () => {
const watchImages = [
src_assets_folder + 'img/**/*.+(png|jpg|jpeg|gif|svg|ico)'
src_assets_folder + 'images/**/*.+(png|jpg|jpeg|gif|svg|ico)'
];

const watch = [
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h2 class="section-heading">Über mich</h2>
<img src="_app/assets/img/logo.svg" alt="Logo">

<p>
Hallo! Ich bin <strong>Jasper</strong>, aktuell noch <strong>Schüler</strong>, <strong>19 Jahre alt</strong> und ein großer <strong>Tech-Enthusiast</strong>.
Hallo! Ich bin <strong>Jasper</strong>, aktuell noch <strong>Schüler</strong>, <strong>20 Jahre alt</strong> und ein großer <strong>Tech-Enthusiast</strong>.
Meine Leidenschaft ist das <strong>Entwickeln und Designen von Websites</strong>.
</p>

Expand All @@ -114,7 +114,7 @@ <h2 class="section-heading">Über mich</h2>
</p>

<p>
Ich glaube fest daran, dass Technologie dazu beitragen kann, die Welt ein Stücken besser zu machen,
Ich glaube fest daran, dass Technologie dazu beitragen kann, die Welt ein Stück weit besser zu machen,
und spreche mich daher auch für mehr <strong>Zukunftsoffenheit</strong> und <strong>gegenseitiges Verständnis</strong> aller Menschen aus.
Nur <strong>gemeinsam</strong> können wir eine Welt erschaffen, in der <strong>alle Menschen glücklich und zufrieden leben</strong>.
Powered by Technology.
Expand Down
2 changes: 1 addition & 1 deletion kontakt.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</p>

<p class="legal-notice">
Hinweis: Zwecks der Bearbeitung deiner Anfrage werden die oben angegebenen Daten elektronisch verarbeitet und gespeichert.
Hinweis: Zwecks der Bearbeitung deiner Anfrage werden die unten angegebenen Daten elektronisch verarbeitet und gespeichert.
Nimmst du mit mir Kontakt auf, erklärst du dich damit einverstanden.
Deine Einwilligung kannst du jederzeit für die Zukunft per E-Mail an <a href="mailto:{{ site.email }}">{{ site.email }}</a> widerrufen.
Mehr Informationen findest du in der <a href="datenschutz.html">Datenschutzerklärung</a>.
Expand Down
28 changes: 18 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "jr-cologne.de",
"name": "@jr-cologne/jr-cologne.de",
"private": true,
"description": "My personal website",
"author": "JR Cologne",
Expand All @@ -9,26 +9,34 @@
"build": "gulp build"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"browser-sync": "^2.26.5",
"gulp": "^4.0.1",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"browser-sync": "^2.26.7",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^6.1.0",
"gulp-babel": "^8.0.0",
"gulp-cssnano": "^2.1.3",
"gulp-imagemin": "^5.0.3",
"gulp-clean-css": "^4.2.0",
"gulp-imagemin": "^6.0.0",
"gulp-plumber": "^1.2.1",
"gulp-sass": "^4.0.2",
"gulp-sourcemaps": "^2.6.5",
"gulp-uglify": "^3.0.2",
"webpack-stream": "^5.2.1"
},
"dependencies": {
"cookieconsent": "^3.1.0",
"intersection-observer": "^0.6.0",
"cookieconsent": "^3.1.1",
"intersection-observer": "^0.7.0",
"jquery": "^3.4.1",
"normalize.css": "^8.0.1",
"outdatedbrowser": "^1.1.5",
"vanilla-lazyload": "^12.0.0"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/jr-cologne/jr-cologne.de.git"
},
"bugs": {
"url": "https://github.com/jr-cologne/jr-cologne.de/issues"
},
"homepage": "https://github.com/jr-cologne/jr-cologne.de#readme"
}

0 comments on commit 45ca942

Please sign in to comment.