Skip to content

Commit

Permalink
refactor: remove p-map-series dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 3, 2020
1 parent e6a8473 commit 480367b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"minimist": "^1.2.5",
"open": "^7.2.1",
"ora": "^5.1.0",
"p-map-series": "^2.1.0",
"postcss-discard-comments": "^4.0.2",
"postcss-import": "^12.0.1",
"postcss-load-config": "^3.0.0",
Expand Down
9 changes: 5 additions & 4 deletions src/node/build/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from 'path'
import fs from 'fs-extra'
import chalk from 'chalk'
import pMapSeries from 'p-map-series'
import { Ora } from 'ora'
import { klona } from 'klona/json'
import { resolveFrom, lookupFile, toArray, isStaticAsset } from '../utils'
Expand Down Expand Up @@ -572,7 +571,9 @@ async function doBuild(options: Partial<BuildConfig>): Promise<BuildResult[]> {

// multiple builds are processed sequentially, in case a build
// depends on the output of a preceding build.
const results = await pMapSeries(builds, async (build, i) => {
const results = []
for (let i = 0; i < builds.length; i++) {
const build = builds[i]
const { output: outputOptions, onResult, ...inputOptions } = build

const indexHtmlPath = getIndexHtmlOutputPath(build, outDir)
Expand Down Expand Up @@ -666,8 +667,8 @@ async function doBuild(options: Partial<BuildConfig>): Promise<BuildResult[]> {
}

spinner && spinner.start()
return result
})
results.push(result)
}

// copy over /public if it exists
if (write && emitAssets && fs.existsSync(publicDir)) {
Expand Down

0 comments on commit 480367b

Please sign in to comment.