Package Exports
- antmove
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (antmove) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
蚂蚁搬家(antmove) 👋
蚂蚁搬家工具,一种小程序跨平台开发解决方案。
安装
- 全局安装
$ npm install antmove -g
- 本地安装
$ npm install antmove --save
快速开始
命令行编译
antmove -i inputpath -o outputpath --env development
--input,-i
- 可选,编译源码目录,如果不传则是当前目录
--output,-o
- 必传,编译输出目录
--env,-e
- 可选,编译模式,生产模式代码会压缩,无编译日志及运行时日志
Node.js
const path = require('path');
const transformFramework = require('antmove');
const WechatPlugin = require('transform-wechat-alipay');
let outputPath = path.join(__dirname, '../../dist');
let inputDirPath = path.join(__dirname, '../../examples/wx-zhihu');
transformFramework({
entry: inputDirPath,
options: {
exclude: [
/^\.\w+/, // 匹配到的文件将不会编译处理
'project.config.json'
]
},
plugins: [
{
plugin: WechatPlugin,
options: {
dist: path.join(outputPath , 'ali-zhihu') // 编译输出目录地址
}
}
]
});
API
transformFramework
- obj |
Object
entry
|String
: 待编译小程序源码目录options
|Object
: 编译配置项exclude
|Array
: 编译忽略文件(忽略的文件不会进行编译处理)
plugins
|Array
: 编译插件引入(如微信转支付宝小程序插件)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Show your support
Give a ⭐️ if this project helped you!