# antmove

> 小程序转换器，基于支付宝/微信小程序转换为多端小程序，让小程序跨平台开发变得简单。

Latest version **1.2.13** (published 2021-02-25) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install antmove
pnpm add antmove
yarn add antmove
bun add antmove
```

Provides the command `antmove`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.13 |
| Published | 2021-02-25 |
| First published | 2019-07-17 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 21 |
| Unpacked size | 65.8 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1327 |
| Author | amap-appx@service.autonavi.com |
| Maintainers | amove, sunxiaobo |
| Keywords | miniprogram, wechat-mini-program, alipay-programm, miniprogram-frame, tool, components, baidu-miniprogram |

## Links

- npm: https://www.npmjs.com/package/antmove
- Repository: https://github.com/ant-move/antmove
- Homepage: https://github.com/ant-move/antmove#readme
- Issues: https://github.com/ant-move/antmove/issues
- npm.io page: https://npm.io/package/antmove

## Dependencies (21)

- [os](https://npm.io/package/os.md) ^0.1.1
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [figlet](https://npm.io/package/figlet.md) ^1.2.3
- [marked](https://npm.io/package/marked.md) ^0.7.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [inquirer](https://npm.io/package/inquirer.md) ^7.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [commander](https://npm.io/package/commander.md) ^2.19.0
- [@amove/wx-tt](https://npm.io/package/@amove/wx-tt.md) ^1.2.2
- [@antmove/utils](https://npm.io/package/@antmove/utils.md) ^1.2.6
- [@antmove/wx-qq](https://npm.io/package/@antmove/wx-qq.md) ^1.2.5
- [@antmove/wx-tt](https://npm.io/package/@antmove/wx-tt.md) ^1.2.5
- [@antmove/wx-wx](https://npm.io/package/@antmove/wx-wx.md) ^1.2.5
- [@amove/wx-alipay](https://npm.io/package/@amove/wx-alipay.md) ^1.2.2
- [@antmove/wx-baidu](https://npm.io/package/@antmove/wx-baidu.md) ^1.2.5
- [@antmove/alipay-wx](https://npm.io/package/@antmove/alipay-wx.md) ^1.2.5
- [@antmove/wx-alipay](https://npm.io/package/@antmove/wx-alipay.md) ^1.2.6
- [@antmove/wx-quickapp](https://npm.io/package/@antmove/wx-quickapp.md) ^1.2.5
- [@antmove/alipay-baidu](https://npm.io/package/@antmove/alipay-baidu.md) ^1.2.5
- [@antmove/alipay-polyfill](https://npm.io/package/@antmove/alipay-polyfill.md) ^1.2.5
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.5.5

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.2.13 (latest) — 2021-02-25
- 1.2.12 — 2021-02-04
- 1.2.11 — 2021-01-27
- 1.2.10 — 2021-01-25
- 1.2.9 — 2021-01-21
- 1.2.8 — 2021-01-15
- 1.2.7 — 2021-01-14
- 1.2.6 — 2021-01-13
- 1.2.5 — 2021-01-11
- 1.2.4 — 2021-01-05
- 1.2.3 — 2021-01-05
- 1.2.2 — 2020-12-30
- 1.2.0 — 2020-12-16
- 1.1.13 — 2020-12-16
- 1.1.12 — 2020-11-19
- … 92 more at https://npm.io/package/antmove/versions

## README

# 指南

Antmove - 小程序转换器，基于支付宝/微信小程序转换为多端小程序，让小程序跨平台开发变得简单。
> 一键实现小程序转换迁徙，不再为重复开发而烦恼。

![antmove structure](https://img.alicdn.com/tfs/TB13u6Cb4z1gK0jSZSgXXavwpXa-3852-936.png)

## 特性

* 简单易使用，一键转换
* 配套详细的编译时日志/运行时日志工具
* 编译生成代码可读性强，可二次编程
* 二次编译支持
* 组件转换支持

## 文档

* [多端代码编写指南](https://ant-move.github.io/guide/children/cross-platform.html)
* [微信转钉钉快速指南](https://ant-move.github.io/guide/contribute/wxToDd.html)
* [微信转支付宝快速指南](https://ant-move.github.io/guide/contribute/wxToAlipay.html)
* [支付宝转微信快速指南](https://ant-move.github.io/guide/contribute/alipayToWx.html)
* [支付宝转百度快速指南](https://ant-move.github.io/guide/contribute/alipayToBaidu.html)
* [支付宝小程序使用 Antmove 组件库指南](https://ant-move.github.io/guide/contribute/alipayUseAntmove.html)
* [钉钉小程序使用 Antmove 组件库指南](https://ant-move.github.io/guide/contribute/ddUseAntmove.html)
* [Antmove 实现原理介绍](https://ant-move.github.io/guide/contribute/howToContribute.html)

## 安装

### VsCode 扩展安装

在 vscode 扩展中搜索 `Antmove` 下载安装 Antmove vscode 转换插件实现一键转换。

### 命令行安装

> 我们推荐使用 npm 或 yarn 的方式进行开发，不仅可在开发环境轻松调试，也可放心地在生产环境打包部署使用，享受整个生态圈和工具链带来的诸多好处。

* 全局安装

```bash
$ npm install antmove -g
```
或
```bash
$ yarn global add antmove
```

* 本地安装

```bash
$ npm install antmove --save
```
或
```bash
$ yarn add antmove
```


> 如果你的网络环境不佳，推荐使用 [cnpm](https://github.com/cnpm/cnpm)。

## 快速开始

### VsCode 扩展使用

* 安装扩展（Antmove - antmove-vscode-plugin）
* 在 VsCode 中打开要转换的项目
* 打开 VsCode 命令面板
    * Mac: `command + shift + p`
    * Windows: `ctrl + shift + p`
* 输入 `Antmove`
* 运行 `Antmove: Run antmove` 命令
* 运行如上命令后会给出一个弹窗，选择转换后生成代码存储目录
* 转换完成

* [antmove-vscode-plugin](https://marketplace.visualstudio.com/items?itemName=antmove-app.antmove-vscode-plugin&ssr=false)

> 本插件依赖于 vscode 代码编辑器，安装了 vscode 的用户才能使用。


### 命令行使用

```bash
npm i -g antmove
```

> 通过 npm 或 yarn 全局安装才能使用如下命令行

* `antmove wx-alipay`（使用前请将终端切换到需转换编译的微信小程序项目路径）

```bash
antmove wx-alipay -i ./ -o ./dist/alipay-app
```

* `antmove` - 该命令更加灵活，可配置输出输出目录/编译模式等

```bash
antmove wx-alipay -i ./wechat-mini/project -o ./dist/alipay-mini/project --env development
```
> 如上的命令表示将 `./wechat-mini/project` 微信小程序项目转换为支付宝小程序项目，转换到 `./dist/alipay-mini/project` 目录
> 如果你不想输入参数，可以体验交互式的命令方式，执行 `antmove` 即可。

#### 配置参数

* `--input,-i`
    * 可选，编译源码目录，如果不传则是当前目录
* `--output,-o`
    * 必传，编译输出目录
* `--env,-e`
    * 可选（development/production），编译模式，生产模式代码会压缩，无编译日志及运行时日志

> 更多配置项可参考[配置参数详情](../config/)。


### Node.js 使用方式

#### 示例
```js
const path = require('path');
const transformFramework = require('antmove');
const WechatPlugin = require('@antmove/wx-alipay');

let outputPath = path.join(__dirname, '../../dist');
let inputDirPath = path.join(__dirname, '../../examples/miniprogram-demo/miniprogram');

const App = transformFramework();

App.use(
    WechatPlugin, 
    {
        entry: inputDirPath,
        dist: outputPath + '/alipaymini-demo',
        env: 'development'
    })
    .start();
```

## [谁在使用](https://github.com/ant-move/antmove/issues/1)

### 微信小程序

> 这里展示的微信小程序为原小程序应用，下面的其它平台小程序为基于这些微信小程序转换得到。

<img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782950065567308.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782952846212329.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782953106003106.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782953317193007.jpg'>

### 支付宝小程序

<img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782958847436418.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782959106179161.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782959378977715.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782959600209087.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782960063558225.jpg'>

### 高德小程序

<img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782960342118999.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782960508762175.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782961458874630.jpg'><img width='150' src='https://cache.amap.com/ecology/tool/amap-backend-server/platform/img/15782961717464794.jpg'>

> 如果你的公司和产品使用了 [Antmove](https://ant-move.github.io/website/docs/readme.html)，欢迎到[这里](https://github.com/ant-move/antmove/issues/1)留言。

## 贡献

欢迎参与 Antmove 项目的开发建设和讨论。
> 提交 pull request 之前请先提 [Issue 讨论](https://github.com/ant-move/antmove/issues).

## 协议
[GPL](https://choosealicense.com/licenses/gpl-3.0/)

## [联系](https://github.com/ant-move/Antmove/issues/23)

* <img width='300' src='https://cache.amap.com/ecology/tool/antmove/web/assets/contact-dingding.jpg'/>
* Email：amap-appx@service.autonavi.com

---
_Source: https://npm.io/package/antmove · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
