# API
# transformFramework
const transformFramework = require('antmove');
const App = transformFramework(); // 得到的 app 实例即可进行转换处理操作
# App
# use
use
|Function
-App.use(plugin, pluginOptions)
- 挂载插件到实例上,可挂载多个,按挂载顺序执行plugin
: 转换插件pluginOptions
: 转换插件配置项entry
|String
- 转换源码目录dist
|String
- 转换后代码输出目录env
|String
- 编译环境设置(env/prod)- 默认值为生产环境
# start
start
|Function
- 开始编译操作
# 示例
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();