初始化微信小程序

安装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
相关推荐
明月_清风2 分钟前
位图与布隆过滤器:海量数据下的"存在性判断"艺术
前端·后端·算法
明月_清风9 分钟前
Hash 表从入门到精通:Go 实战与工程细节
前端·后端·算法
考虑考虑19 分钟前
ElasticSearch索引命令
运维·后端·elasticsearch
玉宇夕落2 小时前
背单词项目一:融会贯通:从零构建"单词大师"后台——Next.js + Supabase + Drizzle 全栈开发实战
后端
橙序员小站2 小时前
从 Demo 到生产:Agent Harness 如何把 AI 真正“接”进项目
后端·aigc·ai编程
她的男孩2 小时前
一个开源低代码框架的协作 SPI 是怎么设计的 ForgeAdmin 拆解 + 实战接入新平台
后端·算法·架构
蓝山6162 小时前
Python 字典(Dictionary)完全指南:从入门到实战
后端
foggyprojects2 小时前
在 DeepSeek Harness 里跑通 Foggy:从安装插件到第一次问数
后端
不甘先生3 小时前
Go 中 type、方法与指针接收者:从 str_name.Name() 看懂 Go 的类型系统
开发语言·后端·golang
摇滚侠4 小时前
《SpringBoot 3:入门与应用实战》第 14 章 打包与部署 Spring Boot 应用打包 阅读笔记 41
spring boot·笔记·后端