Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/springhgui/wepy-cli-extend
wepy-cli 2 插件,解决部分官方不解决的bug或小程序新特性
https://github.com/springhgui/wepy-cli-extend
Last synced: 7 days ago
JSON representation
wepy-cli 2 插件,解决部分官方不解决的bug或小程序新特性
- Host: GitHub
- URL: https://github.com/springhgui/wepy-cli-extend
- Owner: SpringHgui
- Created: 2021-11-30T12:43:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-30T13:42:59.000Z (almost 3 years ago)
- Last Synced: 2024-11-08T00:05:15.791Z (7 days ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wepy-cli-extend
[![npm](https://img.shields.io/npm/v/wepy-cli-extend)](https://www.npmjs.com/package/wepy-cli-extend)
![NPM](https://img.shields.io/npm/l/wepy-cli-extend)
[![npm](https://img.shields.io/npm/dy/wepy-cli-extend)](https://www.npmjs.com/package/wepy-cli-extend)wepy-cli 2 插件,解决部分官方不解决的bug或小程序新特性
# 安装
```
npm i wepy-cli-extend --save-dev
```# 配置
在项目根目录`wepy.config.js`文件添加如下
```
const cliExt = require('wepy-cli-extend');module.exports = {
plugins: [
cliExt()
]
}
```## 支持的功能如下
### 1.支持useExtendedLib导入weui
使用方式,如`index.wpy`文件的 config节点配置如下
```xml{
navigationBarTitleText: 'WePY 2.0 Feature Demo',
usingComponents: {
"mp-icon": "raw:weui-miniprogram/icon/icon",
"mp-cells": "raw:weui-miniprogram/cells/cells",
"mp-cell": "raw:weui-miniprogram/cell/cell",
"mp-slideview": "raw:weui-miniprogram/slideview/slideview",
"mp-dialog": "raw:weui-miniprogram/dialog/dialog",
"mp-msg": "raw:weui-miniprogram/msg/msg"
}
}```
编译后的结果为 `index.json` 文件内容如下
```
{
"navigationBarTitleText": "WePY 2.0 Feature Demo",
"component": true,
"usingComponents": {
"mp-icon": "weui-miniprogram/icon/icon",
"mp-cells": "weui-miniprogram/cells/cells",
"mp-cell": "weui-miniprogram/cell/cell",
"mp-slideview": "weui-miniprogram/slideview/slideview",
"mp-dialog": "weui-miniprogram/dialog/dialog",
"mp-msg": "weui-miniprogram/msg/msg"
}
}
```