新的打包样式在Windows上面没有办法执行 #3052
Create-Peace
started this conversation in
General
Replies: 2 comments
-
在 Windows 上执行 以下是一个简单的示例,说明如何在 Node.js 脚本中实现这种兼容性: const { exec } = require('child_process');
const os = require('os');
const isWindows = os.platform() === 'win32';
const command = isWindows ? 'robocopy /E /COPYALL source destination' : 'rsync -av source/ destination/';
exec(command, (error, stdout, stderr) => {
if (error) {
console.error(`执行错误: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
console.error(`stderr: ${stderr}`);
}); 在这个脚本中,我们使用 如果您希望在 antvis/S2 项目中实现此更改,建议您在项目的构建脚本中应用类似的逻辑。 🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
可以来个 PR, 我这边没有 Windows 没法调试 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
pnpm build:esm 在Windows上执行报错,Windows上没有rsync命令,我在Windows上使用roboCopy替代resync,能做个兼容吗?
Beta Was this translation helpful? Give feedback.
All reactions