Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 26, 2021. It is now read-only.

Commit f83e989

Browse files
committed
chore: update release.sh
1 parent ece7d56 commit f83e989

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

‎build/configs.js‎

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
const fs = require('fs')
21
const path = require('path')
32
const babel = require('rollup-plugin-babel')
4-
const beautify = require('js-beautify').js_beautify
53
const replace = require('rollup-plugin-replace')
6-
const pkg = require('../package.json')
7-
const version = process.env.VERSION || pkg.version
4+
const version = process.env.VERSION || require('../package.json').version
85
const banner =
96
`/**
107
* vue-webview-js-bridge v${version}
@@ -65,25 +62,12 @@ function genConfig (opts) {
6562
return config
6663
}
6764

68-
function writeVersion (version) {
69-
return new Promise(function (resolve, reject) {
70-
pkg.version = version
71-
fs.writeFile(path.join(__dirname, '..', 'package.json'), beautify(JSON.stringify(pkg), { indent_size: 2 }), (err) => {
72-
if (err) {
73-
reject(err)
74-
}
75-
resolve()
76-
})
77-
})
78-
}
79-
80-
function mapValues (obj, fn, version) {
81-
writeVersion(version)
65+
function mapValues (obj, fn) {
8266
const res = {}
8367
Object.keys(obj).forEach(key => {
8468
res[key] = fn(obj[key], key)
8569
})
8670
return res
8771
}
8872

89-
module.exports = mapValues(configs, genConfig,version)
73+
module.exports = mapValues(configs, genConfig)

‎package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"eslint-plugin-vue-libs": "^3.0.0",
4343
"express": "^4.16.4",
4444
"ghooks": "^2.0.4",
45-
"js-beautify": "^1.8.9",
4645
"rollup": "^0.65.0",
4746
"rollup-plugin-babel": "^3.0.7",
4847
"rollup-plugin-replace": "^2.0.0",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /