Skip to content

Commit

Permalink
Merge pull request #7 from mqycn/dev
Browse files Browse the repository at this point in the history
test
  • Loading branch information
mqycn authored Sep 19, 2020
2 parents 788de13 + 958a0a3 commit 7f350e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ const copyAssets = (sourcePath, { assetsPath, distPath }) => {
if (fs.lstatSync(assetsPath(relativePath)).isDirectory()) {
copyAssets(relativePath, provider) // 如果是目录,则继续遍历
} else {
// 复制资源文件
console.log(` ${relativePath}`)
fs.createReadStream(assetsPath(relativePath))
.pipe(fs.createWriteStream(distPath(relativePath)))
fs.copyFileSync(assetsPath(relativePath), distPath(relativePath))
}
})
}
Expand Down Expand Up @@ -78,7 +78,7 @@ module.exports = async function (options = {

// 复制 asssets 文件
console.log('文件复制:')
copyAssets('assets', provider)
await copyAssets('assets', provider)

// 生成静态
console.log('生成静态:')
Expand Down

0 comments on commit 7f350e8

Please sign in to comment.