Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build如何同时添加多个命令 #360

Open
Zzdl opened this issue Aug 8, 2024 · 6 comments
Open

npm run build如何同时添加多个命令 #360

Zzdl opened this issue Aug 8, 2024 · 6 comments

Comments

@Zzdl
Copy link

Zzdl commented Aug 8, 2024

"build": "skr build --clean --build-target=stable & skr babel static --out-dir dist/static --copy --clean",

@otakustay
Copy link
Member

看你的命令,似乎把&改成&&就行?有更具体的问题细节吗

@Zzdl
Copy link
Author

Zzdl commented Aug 8, 2024

看你的命令,似乎把&改成&&就行?有更具体的问题细节吗

改成&&也不行,我想要在编译的同时把一个指定目录及其下面的内容原封不动的拷贝到dist目录下

@otakustay
Copy link
Member

那skr build后直接用cp命令就好了?

@Zzdl
Copy link
Author

Zzdl commented Aug 8, 2024

那skr build后直接用cp命令就好了?

改成"build": "skr build --clean --build-target=stable && cp -r static dist" 或者 "build": "skr build --clean --build-target=stable & cp -r static dist",都会报错
image

@otakustay
Copy link
Member

前面加上SKR_LOGGING=debug再跑一下看看具体错误是什么,这应该后面的cp部分都没到

@Zzdl
Copy link
Author

Zzdl commented Aug 8, 2024

前面加上SKR_LOGGING=debug再跑一下看看具体错误是什么,这应该后面的cp部分都没到

确实是其他问题引起的,谢谢用上面截图方式没有问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants