
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
wwto: wuba wechat mini-program to other mini-program
wwto是一款支持将原生微信小程序转换成其他小程序的工具集合。
使用wwto,几乎不需要对已有的微信小程序做任何改动,可以接近零成本获得百度小程序、支付宝小程序、头条小程序。
npm i wwto -g
#or
yarn global add wwto
**注意:**如果包含插件,请将插件的源码拷贝到:src/plugins/xxx目录下,xxx为被调用插件名称。
# 查看帮助
wwto --help
# 查看转换命令使用说明
wwto build --help
# 查看源码兼容性检测使用说明
wwto lint --help
# 查看版本号
wwto -v
# 转换成百度小程序
wwto build -p baidu -s src -t dist/baidu
# 检测源码对百度小程序的兼容性
wwto lint -p baidu -s src
# 转换成支付宝小程序
wwto build -p alibaba -s src -t dist/alibaba
# 检测源码对支付宝小程序的兼容性
wwto lint -p alibaba -s src
# 转换成头条小程序
wwto build -p toutiao -s src -t dist/toutiao
# 检测源码对头条小程序的兼容性
wwto lint -p toutiao -s src
# 转换成百度&&支付宝&&头条小程序
wwto build -s src -t dist
# 检测源码对百度&&支付宝&&头条小程序的兼容性
wwto lint -s src
# 转换插件调用方式(提供给wbmp使用,原生微信小程序转换已集成到build命令)
wwto plugin -s dist/baidu
npm install
# 安装依赖
npm run build
# 构建项目
npm run dev
# 运行项目
jest --coverage
# 检测单元测试覆盖率
const gulp = require('gulp');
const wwto = require('wwto');
// 转换成百度/支付宝/头条小程序
gulp.task('build', function(cb) {
wwto.toAll({
source: './src',
baiduTarget: './dist/baidu',
alibabaTarget: './dist/alibaba',
toutiaoTarget: './dist/toutiao',
});
});
// 检测源码对各平台的兼容性
gulp.task('lint', function(cb) {
wwto.lintAll({
source: './src'
});
});
注意事项是各平台不支持且无法通过本工具转换完成的一些点,如果要开发跨平台的应用需要规避或者降级处理。
str只能是函数名(字符串),不能包含表达式计算(如:bindtap="flag ? 'fn1' : 'fn2'")arr只能是变量名(字符串),不能包含表达式计算(如:wx:for="{{flag ? arr1 : arr2}}")wx:for和wx:if不能同时使用hiddenproperties绑定的数据,在子组件更新后不会同步到父组件(重要)src属性不能用数组赋值(如:<image src="{{arr}}"></image>)setData保存视图不需要的变量(如原生变量:Animation),继承字段会被丢弃movable-area、movable-view、cover-view、cover-image、map、audio、canmera等)websocket不能使用全局事件(如:wx.onSocketOpen)wx.startRecord, wx.stopRecord)wx:if="{{['aa', 'bb'].indexOf('aa')===-1}}")src属性不能用数组赋值(如:<image src="{{arr}}"></image>)wx:for不支持对象,从源码规避(转换一下)selectComponent,可以通过监听属性的observer来实现外部的调用bindTap),需要添加一层容器来捕获事件json文件或模板绝对路径必须以/开头,相对路径必须以./开头fetch是全局只读对象,不能对其赋值require,参数只能是字符串直接量,不能是变量(如:var path = '/a/b/c'; require(path);)triggerEvent(name, data),name目前只支持字符串直接量,不支持变量swiper组件手动设置current后,不会自动触发bindChange事件,如果需要主动触发websocket连接bindTap),需要添加一层容器来捕获事件欢迎参与 wwto 项目的开发建设和讨论。
提交 pull request 之前请先提 [Issue 讨论].
FAQs
weChat mini-program to other mini-program
We found that wwto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.