mirror of
https://github.com/acid-info/nimbus-site.git
synced 2025-01-27 01:29:04 +00:00
ci: upgrade packages and use yarn instead of npm
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
47b747a015
commit
d52a19af35
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -23,14 +23,14 @@ pipeline {
|
||||
|
||||
stage('Install Deps') {
|
||||
steps {
|
||||
sh 'npm install'
|
||||
sh 'yarn install'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'npm run clean'
|
||||
sh 'npm run build'
|
||||
sh 'yarn run clean'
|
||||
sh 'yarn run build'
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ pipeline {
|
||||
when { expression { GIT_BRANCH.endsWith('master') } }
|
||||
steps { script {
|
||||
sshagent(credentials: ['status-im-auto-ssh']) {
|
||||
sh 'npm run deploy'
|
||||
sh 'yarn run deploy'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
15
gulpfile.js
15
gulpfile.js
@ -1,6 +1,6 @@
|
||||
const log = require('fancy-log')
|
||||
const gulp = require('gulp')
|
||||
const gulpSass = require('gulp-sass')
|
||||
const gulpSass = require('gulp-sass')(require('sass'))
|
||||
const rename = require("gulp-rename")
|
||||
const cleanCSS = require('gulp-clean-css')
|
||||
const rollup = require('gulp-better-rollup')
|
||||
@ -16,7 +16,7 @@ const getEnv = function () {
|
||||
return gitBranch() == 'master' ? 'prod' : 'dev'
|
||||
}
|
||||
|
||||
const generate = (done) => {
|
||||
const html = (done) => {
|
||||
var hexo = new Hexo(process.cwd(), {
|
||||
config: `_config.${getEnv()}.yml`,
|
||||
watch: false,
|
||||
@ -35,7 +35,7 @@ const generate = (done) => {
|
||||
})
|
||||
}
|
||||
|
||||
const bundle = () =>
|
||||
const js = () =>
|
||||
gulp.src('js/main.js')
|
||||
.on('error', log.error)
|
||||
.pipe(rollup({ plugins: [terser()] }, 'iife'))
|
||||
@ -58,17 +58,18 @@ const css = () =>
|
||||
.pipe(gulp.dest('./public/css/'))
|
||||
|
||||
const devel = () => {
|
||||
gulp.watch('./js/*.js', bundle)
|
||||
gulp.watch(['./source/**/*.{md,yml}', './themes/navy/**/*'], generate)
|
||||
gulp.watch('./js/*.js', js)
|
||||
gulp.watch(['./source/**/*.{md,yml}', './themes/navy/**/*'], html)
|
||||
gulp.watch('./themes/navy/source/scss/*.scss', sass, css)
|
||||
}
|
||||
|
||||
const server = () =>
|
||||
gulp.src('./public').pipe(webserver({livereload: true, open: true}));
|
||||
|
||||
exports.bundle = bundle
|
||||
exports.html = html
|
||||
exports.js = js
|
||||
exports.sass = sass
|
||||
exports.css = gulp.series(sass, css)
|
||||
exports.devel = gulp.parallel(server, devel)
|
||||
exports.build = gulp.parallel(generate, bundle, exports.css)
|
||||
exports.build = gulp.parallel(html, js, exports.css)
|
||||
exports.default = exports.build
|
||||
|
37
package.json
37
package.json
@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"hexo": {
|
||||
"version": "4.2.0"
|
||||
"version": "4.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf public/*",
|
||||
@ -13,33 +13,34 @@
|
||||
"deploy": "hexo deploy"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.26.7",
|
||||
"browser-sync": "2.27.7",
|
||||
"cheerio": "^0.22.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-hexo": "^4.1.0",
|
||||
"eslint": "8.6.0",
|
||||
"eslint-config-hexo": "^4.2.0",
|
||||
"fancy-log": "^1.3.3",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-better-rollup": "^4.0.1",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
"gulp-imagemin": "^7.1.0",
|
||||
"gulp-imagemin": "^8.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-sass": "^4.0.2",
|
||||
"gulp-sass": "^5.1.0",
|
||||
"gulp-webserver": "^0.9.1",
|
||||
"hexo": "^4.2.0",
|
||||
"hexo-deployer-git": "^2.1.0",
|
||||
"hexo": "^4.2.1",
|
||||
"hexo-deployer-git": "^3.0.0",
|
||||
"hexo-generator-archive": "^1.0.0",
|
||||
"hexo-generator-feed": "^2.2.0",
|
||||
"hexo-generator-sitemap": "^2.0.0",
|
||||
"hexo-renderer-ejs": "^1.0.0",
|
||||
"hexo-renderer-marked": "^2.0.0",
|
||||
"hexo-renderer-stylus": "^1.1.0",
|
||||
"lodash": "^4.17.15",
|
||||
"lunr": "^2.3.8",
|
||||
"hexo-generator-feed": "^3.0.0",
|
||||
"hexo-generator-sitemap": "^2.2.0",
|
||||
"hexo-renderer-ejs": "^2.0.0",
|
||||
"hexo-renderer-marked": "^4.1.0",
|
||||
"hexo-renderer-stylus": "^2.0.1",
|
||||
"lodash": "^4.17.21",
|
||||
"lunr": "^2.3.9",
|
||||
"rename": "^1.0.4",
|
||||
"rollup": "^2.1.0",
|
||||
"rollup-plugin-terser": "^5.3.0",
|
||||
"rollup": "^2.63.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"run-sequence": "^2.2.1",
|
||||
"watchify": "^3.11.1"
|
||||
"sass": "^1.45.2",
|
||||
"watchify": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"date-fns": "^2.7.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user