我使用的是本地主题开发的Shopify CLI和自动化的Gulp,这是我第一次使用这两种工具,所以这是一次学习的经历。我想使用Gulp来处理shopify theme push命令,但还不能使其工作。如果可能的话,最终目标是建立一个Gulp任务,它将git commit(提示提交消息),然后推送到我的GitHub仓库,再推送到我的Shop商店。这是否超出了Gulp的范围?似乎应该有一种方法来做到这一点,但正如我所说,我刚刚开始弄清楚它能做什么。
shopify theme push
git commit
g9icjywg1#
您可以派生一个节点子进程来运行shopify theme push命令:
const { spawn } = require('child_process'); const child = spawn('shopify', ['theme', 'push']); child.stdout.on('data', data => { console.log('stdout:\n'); console.log(data); }); child.stderr.on('data', data => { console.log('stderr:\n'); console.log(data); });
连锁的步骤绝对应该在大口的范围内。
1条答案
按热度按时间g9icjywg1#
您可以派生一个节点子进程来运行
shopify theme push
命令:连锁的步骤绝对应该在大口的范围内。