有没有办法配置 Gatsbyjs,以便在 Gatsby 中构建其他任何内容之前运行 python 脚本?
最佳答案
假设您使用 npm,您可以使用 npm-scripts在常见的 npm 命令之前和之后运行任意脚本。
在你的情况下,你可能会做类似的事情(未经测试):
"scripts": {
"prestart": "python main.py",
"start": "gatsby"
},
关于javascript - 在 gatsby 构建之前运行 python 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61077153/