Shopify主题开发环境搭建
环境依赖
- Node.js: 20.10 or higher
- Git: 2.28.0 or higher
安装 shopify cli 环境
安装命令:
|
1 |
npm install -g @shopify/cli@latest |
查看帮助
|
1 |
shopify help |
查看版本
|
1 |
shopify version |
参考文档:https://shopify.dev/docs/api/shopify-cli
自定义主题开发
初始化并获取主题目录结构文件
|
1 |
shopify theme init |
进入目录并启动本地服务
|
1 2 3 4 |
cd "my-new-theme" # 启动服务 shopify theme dev |
需要有合作伙伴计划的账号,才能成功连接管理后台
参考文档:https://shopify.dev/docs/storefronts/themes/getting-started/create
相关问题
shopify : 无法加载文件 C:\nvm4w\nodejs\shopify.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
|
1 2 3 4 5 |
在终端输入get-ExecutionPolicy查看执行策略/权限; 输出Restricted(受限制的); 终端输入Set-ExecutionPolicy -Scope CurrentUser命令给用户赋予权限; 输入RemoteSigned; 终端输入get-ExecutionPolicy查看一下权限,显示RemoteSigned就可以了。 |
THE END
二维码
打赏

共有 0 条评论