1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

syntax fixes & package updates

This commit is contained in:
Matthias Kretschmann 2018-07-06 13:58:30 +02:00
parent dc18cdbf14
commit a2ede7e442
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 35 additions and 41 deletions

View File

@ -31,7 +31,7 @@ const krlcModals = (() => { // eslint-disable-line no-unused-vars
}) })
.catch(err => console.error(err)) .catch(err => console.error(err))
return {btcAddress, ethAddress} return { btcAddress, ethAddress }
}, },
vexBtc() { vexBtc() {
@ -41,7 +41,7 @@ const krlcModals = (() => { // eslint-disable-line no-unused-vars
vex.defaultOptions.className = 'vex-theme-kremalicious vex-bitcoin' vex.defaultOptions.className = 'vex-theme-kremalicious vex-bitcoin'
vex.dialog.buttons.YES.text = 'Close' vex.dialog.buttons.YES.text = 'Close'
vex.open({unsafeContent: ` vex.open({ unsafeContent: `
<h3 class="vex__title">Say thanks</h3> <h3 class="vex__title">Say thanks</h3>
<div class="grid grid--full grid-medium--half grid--gutters"> <div class="grid grid--full grid-medium--half grid--gutters">
<div class="grid__col"> <div class="grid__col">

View File

@ -32,7 +32,6 @@ body
word-break: break-word word-break: break-word
text-rendering: optimizeLegibility text-rendering: optimizeLegibility
font-display: swap
// Controversial! But prevents text flickering in // Controversial! But prevents text flickering in
// Safari/Firefox when animations are running // Safari/Firefox when animations are running
-webkit-font-smoothing: antialiased -webkit-font-smoothing: antialiased

View File

@ -1,5 +1,5 @@
import fs from 'fs' import fs from 'fs'
import {src, dest, parallel, series, watch} from 'gulp' import { src, dest, parallel, series, watch } from 'gulp'
import del from 'del' import del from 'del'
import parallelize from 'concurrent-transform' import parallelize from 'concurrent-transform'
import browser from 'browser-sync' import browser from 'browser-sync'
@ -134,7 +134,7 @@ export const jekyll = done => {
jekyllOptions = 'jekyll build --config _config.yml,_config.dev.yml --incremental --drafts --future' jekyllOptions = 'jekyll build --config _config.yml,_config.dev.yml --incremental --drafts --future'
} }
const jekyll = cp.execFile('bundle', ['exec', jekyllOptions], {stdio: 'inherit'}) const jekyll = cp.execFile('bundle', ['exec', jekyllOptions], { stdio: 'inherit' })
const jekyllLogger = buffer => { const jekyllLogger = buffer => {
buffer.toString() buffer.toString()
@ -167,7 +167,7 @@ export const html = () => src(DIST + '/**/*.html')
// //
// Styles // Styles
// //
const processors = [ const plugins = [
autoprefixer(), autoprefixer(),
cssnano() cssnano()
] ]
@ -178,11 +178,11 @@ export const css = () =>
SRC + '/_assets/styl/post-*.styl' SRC + '/_assets/styl/post-*.styl'
]) ])
.pipe($.if(!isProduction, $.sourcemaps.init())) .pipe($.if(!isProduction, $.sourcemaps.init()))
.pipe($.stylus({'include css': true})).on('error', onError) .pipe($.stylus({ 'include css': true })).on('error', onError)
.pipe($.postcss(processors)).on('error', onError) .pipe($.postcss(plugins)).on('error', onError)
.pipe($.if(!isProduction, $.sourcemaps.write())) .pipe($.if(!isProduction, $.sourcemaps.write()))
.pipe($.if(isProduction, $.header(BANNER, {pkg}))) .pipe($.if(isProduction, $.header(BANNER, { pkg })))
.pipe($.rename({suffix: '.min'})) .pipe($.rename({ suffix: '.min' }))
.pipe(dest(DIST + '/assets/css/')) .pipe(dest(DIST + '/assets/css/'))
.pipe(browser.stream()) .pipe(browser.stream())
@ -228,8 +228,8 @@ export const js = () =>
})).on('error', onError) })).on('error', onError)
.pipe($.if(isProduction, minify())).on('error', onError) .pipe($.if(isProduction, minify())).on('error', onError)
.pipe($.if(!isProduction, $.sourcemaps.write())) .pipe($.if(!isProduction, $.sourcemaps.write()))
.pipe($.if(isProduction, $.header(BANNER, {pkg}))) .pipe($.if(isProduction, $.header(BANNER, { pkg })))
.pipe($.rename({suffix: '.min'})) .pipe($.rename({ suffix: '.min' }))
.pipe(dest(DIST + '/assets/js/')) .pipe(dest(DIST + '/assets/js/'))
@ -237,10 +237,10 @@ export const js = () =>
// Images // Images
// //
const imageminPlugins = [ const imageminPlugins = [
$.imagemin.gifsicle({interlaced: true}), $.imagemin.gifsicle({ interlaced: true }),
$.imagemin.jpegtran(), $.imagemin.jpegtran(),
$.imagemin.optipng({optimizationLevel: 5}), $.imagemin.optipng({ optimizationLevel: 5 }),
$.imagemin.svgo({plugins: [{removeViewBox: false}]}) $.imagemin.svgo({ plugins: [{ removeViewBox: false }] })
] ]
// Copy all images // Copy all images
@ -296,7 +296,7 @@ export const revReplace = done => {
const manifest = src(DIST + '/assets/rev-manifest.json') const manifest = src(DIST + '/assets/rev-manifest.json')
return src(DIST + '/**/*.{html,css,js}') return src(DIST + '/**/*.{html,css,js}')
.pipe($.revReplace({manifest})) .pipe($.revReplace({ manifest }))
.pipe(dest(DIST)) .pipe(dest(DIST))
} }
done() done()
@ -441,15 +441,15 @@ export const s3 = () => src(DIST + '/**/*')
// Font mime types // Font mime types
'.ttf$': { '.ttf$': {
key: '$&', key: '$&',
headers: {'Content-Type': 'application/x-font-ttf'} headers: { 'Content-Type': 'application/x-font-ttf' }
}, },
'.woff$': { '.woff$': {
key: '$&', key: '$&',
headers: {'Content-Type': 'application/x-font-woff'} headers: { 'Content-Type': 'application/x-font-woff' }
}, },
'.woff2$': { '.woff2$': {
key: '$&', key: '$&',
headers: {'Content-Type': 'application/x-font-woff2'} headers: { 'Content-Type': 'application/x-font-woff2' }
}, },
// Pass-through for anything that wasn't matched by routes above, to be uploaded with default options // Pass-through for anything that wasn't matched by routes above, to be uploaded with default options

View File

@ -21,13 +21,9 @@
"space": 4, "space": 4,
"semicolon": false, "semicolon": false,
"rules": { "rules": {
"no-multiple-empty-lines": [ "no-multiple-empty-lines": [ "error", { "max": 2, "maxEOF": 1 }],
"error", "object-curly-spacing": ["error", "always"],
{ "promise/prefer-await-to-then": 0
"max": 2,
"maxEOF": 1
}
]
}, },
"globals": [ "globals": [
"window", "window",
@ -38,8 +34,8 @@
] ]
}, },
"dependencies": { "dependencies": {
"@webcomponents/webcomponentsjs": "^2.0.0", "@webcomponents/webcomponentsjs": "^2.0.2",
"clipboard": "^2.0.0", "clipboard": "^2.0.1",
"exif-js": "^2.3.0", "exif-js": "^2.3.0",
"normalize-css": "^2.3.1", "normalize-css": "^2.3.1",
"normalize-opentype.css": "^0.2.4", "normalize-opentype.css": "^0.2.4",
@ -49,15 +45,14 @@
"vex-js": "^4.1.0" "vex-js": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"acorn": "^5.7.1", "autoprefixer": "^8.6.5",
"autoprefixer": "^8.6.3",
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"browser-sync": "^2.24.4", "browser-sync": "^2.24.5",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"concurrent-transform": ">=1.0.0", "concurrent-transform": "^1.0.0",
"critical": "^1.3.3", "critical": "^1.3.3",
"cssnano": ">=3.6.2", "cssnano": "^4.0.0",
"del": "^3.0.0", "del": "^3.0.0",
"fs": ">=0.0.2", "fs": ">=0.0.2",
"gulp": "^4.0.0", "gulp": "^4.0.0",
@ -66,27 +61,27 @@
"gulp-cli": "^2.0.0", "gulp-cli": "^2.0.0",
"gulp-header": "^2.0.5", "gulp-header": "^2.0.5",
"gulp-htmlmin": "^4.0.0", "gulp-htmlmin": "^4.0.0",
"gulp-if": ">=1.2.5", "gulp-if": "^2.0.2",
"gulp-imagemin": "^4.1.0", "gulp-imagemin": "^4.1.0",
"gulp-include": ">=2.0.2", "gulp-include": "^2.3.1",
"gulp-load-plugins": ">=0.10.0", "gulp-load-plugins": "^1.5.0",
"gulp-postcss": "^7.0.1", "gulp-postcss": "^7.0.1",
"gulp-rename": "^1.3.0", "gulp-rename": "^1.3.0",
"gulp-replace": "^1.0.0", "gulp-replace": "^1.0.0",
"gulp-rev": "^8.1.1", "gulp-rev": "^8.1.1",
"gulp-rev-replace": "^0.4.4", "gulp-rev-replace": "^0.4.4",
"gulp-sourcemaps": "^2.6.3", "gulp-sourcemaps": "^2.6.4",
"gulp-stylus": "^2.7.0", "gulp-stylus": "^2.7.0",
"gulp-svg-sprite": "^1.4.0", "gulp-svg-sprite": "^1.4.0",
"gulp-uglify": ">=1.2.0", "gulp-uglify": "^3.0.0",
"js-yaml": "^3.12.0", "js-yaml": "^3.12.0",
"request": "^2.87.0", "request": "^2.87.0",
"uglify-es": "^3.3.10", "uglify-es": "^3.3.9",
"xo": "^0.21.0", "xo": "^0.21.1",
"yargs": "^12.0.1" "yargs": "^12.0.1"
}, },
"engines": { "engines": {
"node": ">=7.0.0" "node": ">=8.0.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",