mirror of https://github.com/vuejs/core.git
workflow: improve the benchmark scripts
This commit is contained in:
parent
7b3c1766be
commit
abd685d7f4
|
@ -177,7 +177,7 @@ async function buildApp(isVapor) {
|
||||||
|
|
||||||
function startServer() {
|
function startServer() {
|
||||||
const server = connect().use(sirv('./client/dist')).listen(port)
|
const server = connect().use(sirv('./client/dist')).listen(port)
|
||||||
console.info(`\n\nServer started at`, colors.blue(`http://localhost:${port}`))
|
printPort(port)
|
||||||
process.on('SIGTERM', () => server.close())
|
process.on('SIGTERM', () => server.close())
|
||||||
return server
|
return server
|
||||||
}
|
}
|
||||||
|
@ -338,3 +338,14 @@ function compute(array) {
|
||||||
function round(n) {
|
function round(n) {
|
||||||
return +n.toFixed(2)
|
return +n.toFixed(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @param {number} port */
|
||||||
|
function printPort(port) {
|
||||||
|
const vaporLink = !noVapor
|
||||||
|
? `\nVapor: ${colors.blue(`http://localhost:${port}/vapor`)}`
|
||||||
|
: ''
|
||||||
|
const vdomLink = vdom
|
||||||
|
? `\nvDom: ${colors.blue(`http://localhost:${port}/vdom`)}`
|
||||||
|
: ''
|
||||||
|
console.info(`\n\nServer started at`, vaporLink, vdomLink)
|
||||||
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "pnpm start --noHeadless --skipBench --vdom",
|
||||||
"start": "node index.js"
|
"start": "node index.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in New Issue