# 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();