Skip to content

Commit 5978f71

Browse files
committed
【fix】修改打包
1 parent d7a8bd0 commit 5978f71

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

build/publish.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ fs.readdir(path.join(filePath, key), function (err, files) {
4444
})
4545
});
4646

47-
// 拷贝resources文件夹到src/mapboxgl
48-
const resourcePath = path.join(__dirname, "../dist/resources");
49-
const srouceDestDir = path.join(__dirname, "../src/mapboxgl/resources");
50-
fse.copy(resourcePath, srouceDestDir, err => {
51-
if (err) {throw err}
52-
console.log('success')
53-
})
47+
if (key === 'mapboxgl') {
48+
// 拷贝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+
})
55+
}

0 commit comments

Comments
 (0)