Skip to content

Commit 28f4010

Browse files
committed
【fix】修复打包
1 parent 5978f71 commit 28f4010

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

build/publish.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ fs.readdir(path.join(filePath, key), function (err, files) {
4646

4747
if (key === 'mapboxgl') {
4848
// 拷贝resources文件夹到src/mapboxgl
49-
const resourcePath = path.join(__dirname, "../dist/resources");
50-
const srouceDestDir = path.join(__dirname, "../src/mapboxgl/resources");
51-
fse.copySync(resourcePath, srouceDestDir, err => {
52-
if (err) { throw err }
53-
console.log('success')
54-
})
49+
const source = path.join(__dirname, "../dist/resources");
50+
const target = path.join(__dirname, "../src/mapboxgl/resources");
51+
fse.removeSync(target);
52+
fse.copySync(source, target);
5553
}

0 commit comments

Comments
 (0)