mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
Merge pull request #45 from kremalicious/greenkeeper/xo-0.20.2
chore(package): update xo to version 0.20.2
This commit is contained in:
commit
ff1e995b9e
@ -4,7 +4,7 @@
|
|||||||
//=include exif-js/exif.js
|
//=include exif-js/exif.js
|
||||||
/* eslint-enable spaced-comment */
|
/* eslint-enable spaced-comment */
|
||||||
|
|
||||||
window.onload = getExif
|
window.addEventListener('load', getExif, false)
|
||||||
|
|
||||||
function getExif() {
|
function getExif() {
|
||||||
const image = document.querySelector('.hentry__teaser img')
|
const image = document.querySelector('.hentry__teaser img')
|
||||||
|
@ -22,7 +22,7 @@ import pkg from './package'
|
|||||||
const site = yaml.safeLoad(fs.readFileSync('./_config.yml'))
|
const site = yaml.safeLoad(fs.readFileSync('./_config.yml'))
|
||||||
|
|
||||||
// Load plugins
|
// Load plugins
|
||||||
const spawn = require('child_process').spawn
|
const cp = require('child_process')
|
||||||
const $ = require('gulp-load-plugins')()
|
const $ = require('gulp-load-plugins')()
|
||||||
|
|
||||||
// Custom minify
|
// Custom minify
|
||||||
@ -134,9 +134,9 @@ 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 jekyllInstance = spawn('bundle', ['exec', jekyllOptions], {stdio: 'inherit'})
|
const jekyll = cp.execFile('bundle', ['exec', jekyllOptions], {stdio: 'inherit'})
|
||||||
|
|
||||||
jekyllInstance.on('error', error => onError(error)).on('close', done)
|
jekyll.on('error', error => onError(error)).on('close', done)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -171,14 +171,14 @@ export const css = () =>
|
|||||||
SRC + '/_assets/styl/kremalicious3.styl',
|
SRC + '/_assets/styl/kremalicious3.styl',
|
||||||
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(processors)).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())
|
||||||
|
|
||||||
// Inline critical-path CSS
|
// Inline critical-path CSS
|
||||||
export const criticalCss = done => {
|
export const criticalCss = done => {
|
||||||
@ -216,15 +216,15 @@ export const js = () =>
|
|||||||
SRC + '/_assets/js/*.js',
|
SRC + '/_assets/js/*.js',
|
||||||
'!' + SRC + '/_assets/js/_*.js'
|
'!' + SRC + '/_assets/js/_*.js'
|
||||||
])
|
])
|
||||||
.pipe($.sourcemaps.init())
|
.pipe($.sourcemaps.init())
|
||||||
.pipe($.include({
|
.pipe($.include({
|
||||||
includePaths: ['node_modules', SRC + '/_assets/js']
|
includePaths: ['node_modules', SRC + '/_assets/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/'))
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -423,7 +423,7 @@ export const s3 = () => src(DIST + '/**/*')
|
|||||||
|
|
||||||
// Every other asset, cached
|
// Every other asset, cached
|
||||||
'^assets/.+$': {
|
'^assets/.+$': {
|
||||||
cacheTime: 2592000 // Cache for 1 month
|
cacheTime: 2592000 // Cache for 1 month
|
||||||
},
|
},
|
||||||
|
|
||||||
// All html files, not cached & gzipped
|
// All html files, not cached & gzipped
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
"js-yaml": "^3.10.0",
|
"js-yaml": "^3.10.0",
|
||||||
"request": "^2.83.0",
|
"request": "^2.83.0",
|
||||||
"uglify-es": "^3.3.5",
|
"uglify-es": "^3.3.5",
|
||||||
"xo": "^0.18.2",
|
"xo": "^0.20.2",
|
||||||
"yargs": "^11.0.0"
|
"yargs": "^11.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user