https://github.com/mipengine/mip-cli-plugin-swan
MIP Cli 的插件,可以将 MIP 页面转换为百度智能小程序
https://github.com/mipengine/mip-cli-plugin-swan
Last synced: 12 months ago
JSON representation
MIP Cli 的插件,可以将 MIP 页面转换为百度智能小程序
- Host: GitHub
- URL: https://github.com/mipengine/mip-cli-plugin-swan
- Owner: mipengine
- License: mit
- Created: 2019-03-20T06:19:36.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-20T08:09:51.000Z (almost 7 years ago)
- Last Synced: 2025-01-10T21:32:48.271Z (about 1 year ago)
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 18
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mip-cli-plugin-swan
MIP Cli 的插件,可以将小程序的页面转换为[百度智能小程序](https://smartprogram.baidu.com/developer/index.html)
## 使用方法
插件支持两种使用方式,URL 和本地的文件均可
```
$ npm install mip2
$ mip2 swan --name index --dir . https://www.mipengine.org/
$ mip2 swan --name index --dir /home/mipengine/swan index.html
```
通过上面的命令将会在对应的目录生成转换好的小程序页面。
- 如果目标目录是小程序目录,则会在目录的 components 目录中插入引用的 MIP 自定义组件,同时在 pages 目录放入对应的页面
- 如果目标目录不是小程序目录,则会提示输入目录名,转换工具会创建一个目录,并将对应的文件写入目录中