初始化微信小程序

安装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
相关推荐
葫芦和十三37 分钟前
图解 MongoDB 25|分片架构三件套:mongos、config server 和 shard
后端·mongodb·agent
葫芦和十三7 小时前
图解 MongoDB 26|片键设计:决定集群命运的一个决定
后端·mongodb·agent
Avan_菜菜8 小时前
使用 Docker + rclone 自建 WebDAV
后端·agent·claude
阳光是sunny10 小时前
别再被 worktree 绕晕了!AI 编程时代你必须掌握的 Git 隔离神器
前端·人工智能·后端
万少11 小时前
万少的博客 - 技术分享与解决方案
前端·javascript·后端
咖啡八杯11 小时前
GoF设计模式——备忘录模式
java·后端·spring·设计模式
苍何11 小时前
腾讯再放大招,企微 Agent 大圆开启内测
后端
ethantan11 小时前
一篇讲解AI Agent 组成:像人一样思考的智能体
人工智能·后端·程序员
Cosolar13 小时前
vLLM 生产级部署完全指南
人工智能·后端·架构
IT_陈寒14 小时前
垃圾回收器选错了,我的Java服务内存炸了
前端·人工智能·后端