Update packages, Gulp, fix license

This commit is contained in:
lostinlight 2019-01-15 02:01:54 +03:00
parent cba0f55291
commit ad11f18ea8
6 changed files with 6953 additions and 4344 deletions

View file

@ -1,5 +1,5 @@
image: node:8.12 image: node:10.15.0
pages: pages:
script: script:
@ -7,7 +7,6 @@ pages:
- npm install gulp -g - npm install gulp -g
- gulp build --cwd ./themes/starter - gulp build --cwd ./themes/starter
- ./node_modules/hexo/bin/hexo generate - ./node_modules/hexo/bin/hexo generate
- find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
artifacts: artifacts:
paths: paths:
- public - public
@ -34,4 +33,5 @@ cert-renewal:
- git config --global user.email $GITLAB_USER_EMAIL - git config --global user.email $GITLAB_USER_EMAIL
- chmod +x ./letsencrypt_generate.sh - chmod +x ./letsencrypt_generate.sh
- chmod +x ./letsencrypt_authenticator.sh - chmod +x ./letsencrypt_authenticator.sh
- chmod +x ./letsencrypt_cleanup.sh
- ./letsencrypt_generate.sh - ./letsencrypt_generate.sh

View file

@ -78,11 +78,14 @@ nofollow:
noreferrer: true noreferrer: true
noopener: true noopener: true
html_minifier: # hexo-yam minifier
exclude: neat_enable: true
keepClosingSlash: true neat_html:
removeComments: true enable: true
collapseWhitespace: true neat_css:
enable: false
neat_js:
enable: false
feed: feed:
type: atom type: atom

11109
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@
"url": "https://gitlab.com/fediverse/fediverse.gitlab.io.git" "url": "https://gitlab.com/fediverse/fediverse.gitlab.io.git"
}, },
"author": "lostinlight", "author": "lostinlight",
"license": "AGPL", "license": "AGPL-3.0-or-later",
"hexo": { "hexo": {
"version": "3.7.1" "version": "3.7.1"
}, },
@ -16,41 +16,41 @@
"hexo": "^3.7.1", "hexo": "^3.7.1",
"hexo-autonofollow": "git+https://gitlab.com/lostinlight/hexo-autonofollow.git", "hexo-autonofollow": "git+https://gitlab.com/lostinlight/hexo-autonofollow.git",
"hexo-browsersync": "^0.3.0", "hexo-browsersync": "^0.3.0",
"hexo-deployer-git": "^0.3.1", "hexo-deployer-git": "^1.0.0",
"hexo-generator-archive-i18n": "git+https://gitlab.com/lostinlight/hexo-generator-archive-i18n.git", "hexo-generator-archive-i18n": "git+https://gitlab.com/lostinlight/hexo-generator-archive-i18n.git",
"hexo-generator-category": "^0.1.3", "hexo-generator-category": "^0.1.3",
"hexo-generator-feed": "^1.2.2", "hexo-generator-feed": "^1.2.2",
"hexo-generator-index": "^0.2.1", "hexo-generator-index": "^0.2.1",
"hexo-generator-index-i18n": "^0.2.1", "hexo-generator-index-i18n": "^0.2.1",
"hexo-generator-tag": "^0.2.0", "hexo-generator-tag": "^0.2.0",
"hexo-html-minifier": "0.0.2",
"hexo-pagination": "^0.1.0", "hexo-pagination": "^0.1.0",
"hexo-processor-static": "^1.1.0", "hexo-processor-static": "^1.1.0",
"hexo-renderer-ejs": "^0.3.1", "hexo-renderer-ejs": "^0.3.1",
"hexo-renderer-markdown-it": "^3.4.1", "hexo-renderer-markdown-it": "^3.4.1",
"hexo-server": "^0.3.2" "hexo-server": "^0.3.2",
"hexo-yam": "^1.0.4"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-eslint": "^8.2.3", "babel-eslint": "^10.0.1",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"gulp": "^3.9.1", "del": "^3.0.0",
"gulp-autoprefixer": "^5.0.0", "gulp": "^4.0.0",
"gulp-autoprefixer": "^6.0.0",
"gulp-babel": "^7.0.1", "gulp-babel": "^7.0.1",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.3", "gulp-cssnano": "^2.1.3",
"gulp-eslint": "^4.0.2", "gulp-eslint": "^5.0.0",
"gulp-notify": "^3.2.0", "gulp-notify": "^3.2.0",
"gulp-plumber": "^1.2.0", "gulp-plumber": "^1.2.0",
"gulp-rename": "^1.2.3", "gulp-rename": "^1.2.3",
"gulp-sass": "^4.0.1", "gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4", "gulp-sourcemaps": "^2.6.4",
"gulp-stylelint": "^5.0.0", "gulp-stylelint": "^8.0.0",
"gulp-tinypng-extended": "^1.5.0",
"gulp-typeset": "0.0.2",
"gulp-uglify": "^3.0.0", "gulp-uglify": "^3.0.0",
"imagemin-jpeg-recompress": "^5.1.0", "imagemin-jpeg-recompress": "^6.0.0",
"run-sequence": "^2.2.1", "stylelint": "^9.9.0",
"webpack-stream": "^4.0.3" "uglifyjs-webpack-plugin": "^2.1.1",
"webpack-stream": "^5.2.1"
} }
} }

View file

@ -10,11 +10,9 @@
notify = require('../../node_modules/gulp-notify'), notify = require('../../node_modules/gulp-notify'),
plumber = require('../../node_modules/gulp-plumber'), plumber = require('../../node_modules/gulp-plumber'),
rename = require('../../node_modules/gulp-rename'), rename = require('../../node_modules/gulp-rename'),
runSequence = require('../../node_modules/run-sequence'),
sass = require('../../node_modules/gulp-sass'), sass = require('../../node_modules/gulp-sass'),
sourcemaps = require('../../node_modules/gulp-sourcemaps'), sourcemaps = require('../../node_modules/gulp-sourcemaps'),
stylelint = require('../../node_modules/gulp-stylelint'), stylelint = require('../../node_modules/gulp-stylelint'),
tinypng = require('../../node_modules/gulp-tinypng-extended'),
uglify = require('../../node_modules/gulp-uglify'), uglify = require('../../node_modules/gulp-uglify'),
webpack = require('../../node_modules/webpack-stream'); webpack = require('../../node_modules/webpack-stream');
@ -109,46 +107,16 @@
return del(['source/js/*', 'source/css/*']); return del(['source/js/*', 'source/css/*']);
}); });
// Images
// gulp.task('images', function() {
// return gulp.src('../../source/img/**/*')
// .pipe(imagemin([
// imagemin.gifsicle(),
// jpegRecompress({
// loops: 4,
// min: 50,
// max: 95,
// quality:'high'
// }),
// imagemin.optipng(),
// imagemin.svgo()
// ]))
// .pipe(gulp.dest('../../source/img'))
// });
gulp.task('tinypng', function () {
return gulp.src('../../source/img/**/*.{png,jpg,jpeg}')
.pipe(plumber())
.pipe(tinypng({
key: 'API_KEY',
sigFile: 'images/.tinypng-sigs',
log: true
}))
.pipe(gulp.dest('../../source/img'));
});
// Watch // Watch
gulp.task('watch', function() { gulp.task('watch', function() {
gulp.watch('./source/assets/scss/**/*.scss', ['styles:serve']); gulp.watch('./source/assets/scss/**/*.scss', gulp.series('styles:serve'));
gulp.watch('./source/assets/scripts/**/*.js', ['scripts:serve']); gulp.watch('./source/assets/scripts/**/*.js', gulp.series('scripts:serve'));
}); });
// Development Mode // Development Mode
gulp.task('default', function () { gulp.task('default', gulp.series('styles:lint', 'styles:serve', 'webpack', 'scripts:serve', 'vendor', 'watch', function (done) { done();
runSequence('styles:lint', 'styles:serve', 'webpack', 'scripts:serve', 'vendor', 'watch'); }));
});
// Production Mode // Production Mode
gulp.task('build', function (done) { gulp.task('build', gulp.series('clean', 'styles:build', 'scripts:build', 'webpack', 'vendor', function (done) { done();
runSequence('clean', 'styles:build', 'scripts:build', 'webpack', 'vendor', done); }));
});

View file

@ -2,6 +2,7 @@
const UglifyJsPlugin = require('../../node_modules/uglifyjs-webpack-plugin'); const UglifyJsPlugin = require('../../node_modules/uglifyjs-webpack-plugin');
module.exports = { module.exports = {
mode: 'production',
entry: { entry: {
main: './source/assets/scripts/crystalball' main: './source/assets/scripts/crystalball'
}, },