微信小程序知识点
微信小程序并非一个标准的nodejs项目,也就是说项目可能会找不到package.json
微信小程序项目标志为app.ts
,app.json
,app.wxss
这个目录才是微信小程序的根目录
如果一个工程是nodejs项目,那么他可能有包含了app.ts
,app.json
,app.wxss
的子目录,比如taro-miniapp-template/weapp
project.config.json
和project.private.config.json
也是微信小程序工程根目录的标志。
https://github.com/crazyurus/miniprogram-vscode-extension
https://developers.weixin.qq.com/miniprogram/dev/framework/quickstart/getstart.html
官方demo
官方包
https://www.npmjs.com/package/miniprogram-ci
https://www.npmjs.com/package/miniprogram-api-typings
https://www.npmjs.com/package/@wechat-miniprogram/miniprogram-cli
npm install --global @wechat-miniprogram/miniprogram-cli ##似乎没有更新了?
npm install --save-dev miniprogram-ci
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
小程序根目录下的 app.json 文件用来对微信小程序进行全局配置
项目配置文件
其他包
https://www.npmjs.com/package/@types/wechat-miniprogram
https://www.npmjs.com/package/vite-miniprogram-ci