Skip to content

Commit d52a19a

Browse files
committed
ci: upgrade packages and use yarn instead of npm
Signed-off-by: Jakub Sokołowski <jakub@status.im>
1 parent 47b747a commit d52a19a

File tree

4 files changed

+2377
-2266
lines changed

4 files changed

+2377
-2266
lines changed

Jenkinsfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ pipeline {
2323

2424
stage('Install Deps') {
2525
steps {
26-
sh 'npm install'
26+
sh 'yarn install'
2727
}
2828
}
2929

3030
stage('Build') {
3131
steps {
32-
sh 'npm run clean'
33-
sh 'npm run build'
32+
sh 'yarn run clean'
33+
sh 'yarn run build'
3434
}
3535
}
3636

@@ -45,7 +45,7 @@ pipeline {
4545
when { expression { GIT_BRANCH.endsWith('master') } }
4646
steps { script {
4747
sshagent(credentials: ['status-im-auto-ssh']) {
48-
sh 'npm run deploy'
48+
sh 'yarn run deploy'
4949
}
5050
} }
5151
}

gulpfile.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const log = require('fancy-log')
22
const gulp = require('gulp')
3-
const gulpSass = require('gulp-sass')
3+
const gulpSass = require('gulp-sass')(require('sass'))
44
const rename = require("gulp-rename")
55
const cleanCSS = require('gulp-clean-css')
66
const rollup = require('gulp-better-rollup')
@@ -16,7 +16,7 @@ const getEnv = function () {
1616
return gitBranch() == 'master' ? 'prod' : 'dev'
1717
}
1818

19-
const generate = (done) => {
19+
const html = (done) => {
2020
var hexo = new Hexo(process.cwd(), {
2121
config: `_config.${getEnv()}.yml`,
2222
watch: false,
@@ -35,7 +35,7 @@ const generate = (done) => {
3535
})
3636
}
3737

38-
const bundle = () =>
38+
const js = () =>
3939
gulp.src('js/main.js')
4040
.on('error', log.error)
4141
.pipe(rollup({ plugins: [terser()] }, 'iife'))
@@ -58,17 +58,18 @@ const css = () =>
5858
.pipe(gulp.dest('./public/css/'))
5959

6060
const devel = () => {
61-
gulp.watch('./js/*.js', bundle)
62-
gulp.watch(['./source/**/*.{md,yml}', './themes/navy/**/*'], generate)
61+
gulp.watch('./js/*.js', js)
62+
gulp.watch(['./source/**/*.{md,yml}', './themes/navy/**/*'], html)
6363
gulp.watch('./themes/navy/source/scss/*.scss', sass, css)
6464
}
6565

6666
const server = () =>
6767
gulp.src('./public').pipe(webserver({livereload: true, open: true}));
6868

69-
exports.bundle = bundle
69+
exports.html = html
70+
exports.js = js
7071
exports.sass = sass
7172
exports.css = gulp.series(sass, css)
7273
exports.devel = gulp.parallel(server, devel)
73-
exports.build = gulp.parallel(generate, bundle, exports.css)
74+
exports.build = gulp.parallel(html, js, exports.css)
7475
exports.default = exports.build

package.json

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"hexo": {
6-
"version": "4.2.0"
6+
"version": "4.2.1"
77
},
88
"scripts": {
99
"clean": "rm -rf public/*",
@@ -13,33 +13,34 @@
1313
"deploy": "hexo deploy"
1414
},
1515
"devDependencies": {
16-
"browser-sync": "^2.26.7",
16+
"browser-sync": "2.27.7",
1717
"cheerio": "^0.22.0",
18-
"eslint": "^6.8.0",
19-
"eslint-config-hexo": "^4.1.0",
18+
"eslint": "8.6.0",
19+
"eslint-config-hexo": "^4.2.0",
2020
"fancy-log": "^1.3.3",
2121
"gulp": "^4.0.2",
2222
"gulp-better-rollup": "^4.0.1",
2323
"gulp-clean-css": "^4.3.0",
24-
"gulp-imagemin": "^7.1.0",
24+
"gulp-imagemin": "^8.0.0",
2525
"gulp-rename": "^2.0.0",
26-
"gulp-sass": "^4.0.2",
26+
"gulp-sass": "^5.1.0",
2727
"gulp-webserver": "^0.9.1",
28-
"hexo": "^4.2.0",
29-
"hexo-deployer-git": "^2.1.0",
28+
"hexo": "^4.2.1",
29+
"hexo-deployer-git": "^3.0.0",
3030
"hexo-generator-archive": "^1.0.0",
31-
"hexo-generator-feed": "^2.2.0",
32-
"hexo-generator-sitemap": "^2.0.0",
33-
"hexo-renderer-ejs": "^1.0.0",
34-
"hexo-renderer-marked": "^2.0.0",
35-
"hexo-renderer-stylus": "^1.1.0",
36-
"lodash": "^4.17.15",
37-
"lunr": "^2.3.8",
31+
"hexo-generator-feed": "^3.0.0",
32+
"hexo-generator-sitemap": "^2.2.0",
33+
"hexo-renderer-ejs": "^2.0.0",
34+
"hexo-renderer-marked": "^4.1.0",
35+
"hexo-renderer-stylus": "^2.0.1",
36+
"lodash": "^4.17.21",
37+
"lunr": "^2.3.9",
3838
"rename": "^1.0.4",
39-
"rollup": "^2.1.0",
40-
"rollup-plugin-terser": "^5.3.0",
39+
"rollup": "^2.63.0",
40+
"rollup-plugin-terser": "^7.0.2",
4141
"run-sequence": "^2.2.1",
42-
"watchify": "^3.11.1"
42+
"sass": "^1.45.2",
43+
"watchify": "^4.0.0"
4344
},
4445
"dependencies": {
4546
"date-fns": "^2.7.0"

0 commit comments

Comments
 (0)