初始化微信小程序

安装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
相关推荐
程序猿乐锅1 小时前
【从0-1学习Python | 第七篇】Python 面向对象基础
开发语言·笔记·后端·python·学习·1024程序员节
code2cat1 小时前
Java高级篇之Hibernate:让对象映射到表,理解持久化与事务
java·后端·hibernate·1024程序员节
Younglina1 小时前
三个晚上,我和 WorkBuddy 做了个生图网站
前端·后端·ai编程
金銀銅鐵2 小时前
[Java] 用 CLI 展示 EnumSet 增减元素时的内部变化(下)
java·后端·ai编程
陈随易2 小时前
副业搞钱点子之收入查看器
前端·后端
Profile排查笔记2 小时前
浏览器指纹逆向怎么分析:从网络请求追踪到 JavaScript 采集链
前端·人工智能·后端·自动化
lazy H3 小时前
【计算机网络】第 5 篇:TCP 和 UDP 有什么区别?从 Java 后端场景理解两种传输协议
经验分享·后端·网络协议·tcp/ip·计算机网络·1024程序员节
东宇科技3 小时前
crmeb开源版本安装步骤2026-10-20
后端·php·crmeb
IT_Octopus4 小时前
Apollo 配置中心入门:一所“小学校“读懂 Portal、Meta Server、Config Service
java·后端·spring
CHHH_HHH5 小时前
【Linux网络篇】初识网络与Socket编程基础
linux·服务器·c语言·开发语言·网络·后端·1024程序员节