初始化微信小程序

安装miniprogram-cli

bash 复制代码
F:\business-system\weixin-app-order>npm install -g @wechat-miniprogram/miniprogram-cli
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

added 180 packages in 38s

20 packages are looking for funding
  run `npm fund` for details

验证安装

bash 复制代码
F:\business-system\weixin-app-order>miniprogram --help
Usage: cli [options] [command]

Options:
  -V, --version                output the version number
  -h, --help                   output usage information

Commands:
  init [options] [dirPath]     create a project with template project
  upgrade [options] [dirPath]  upgrade the miniprogram custom component framwork
  cache [options]              show the path of template projects cache

F:\business-system\weixin-app-order>miniprogram -V
0.0.7
F:\business-system\weixin-app-order>miniprogram init --help
Usage: init [options] [dirPath]

create a project with template project

Options:
  -t, --type <type>  template project type, only accept "custom-component", "miniprogram", "plugin", "game"
  -f, --force        all files will be overrided whether it already exists or not
  -p, --proxy <url>  http/https request proxy
  -n, --newest       use newest template to initialize project
  -h, --help         output usage information

初始化微信小程序

bash 复制代码
miniprogram init --type miniprogram . --newest
相关推荐
GetcharZp2 小时前
抛弃低效SSH!这套Ansible+Web可视化神器,让你天天准点下班!
后端
weixin_446260855 小时前
HACO:面向动态部署环境的对冲式智能计算可靠多智能体调度框架
后端·python·flask
ttwuai6 小时前
Cursor 生成 CRUD 后,Go 后台接口别只测 200:JWT、RBAC 和 tenant_id 怎么验
开发语言·后端·golang
用户8356290780516 小时前
Python 实现 Excel 页面布局与打印设置自动化
后端·python
用户9931441579846 小时前
微服务框架中获取用户信息
后端
xuanWb7 小时前
手写一个 LLM API 网关:Anthropic 与 OpenAI 协议转换的完整实现
后端
苍何7 小时前
给 Codex 换皮肤这门生意,被我开源了
后端
用户8356290780517 小时前
Python 实现 Excel 命名范围(Named Range)的创建与管理
后端·python
程序员David7 小时前
我让 Claude 从架构文档一路干到代码,踩了三个坑才摸清边界
后端