新增功能
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const sourceDir = '/Users/connor/Desktop/work/TRTCCloud-wx/trtc-component-wx/miniprogram_dist'
|
||||
const targetDir = '/Users/connor/Desktop/TUIRoomEngine/samples/tui-room-uniapp/dist/dev/mp-weixin/node_modules/@tencentcloud/trtc-component-wx/miniprogram_dist'
|
||||
|
||||
fs.readdir(sourceDir, (err, files) => {
|
||||
if (err) throw err
|
||||
|
||||
files.forEach((file) => {
|
||||
const sourceFile = path.join(sourceDir, file)
|
||||
const targetFile = path.join(targetDir, file)
|
||||
|
||||
fs.copyFile(sourceFile, targetFile, (err) => {
|
||||
if (err) throw err
|
||||
console.log(`${sourceFile} was copied to ${targetFile}`)
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user