npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wx2any

v1.0.1

Published

微信小程序 转换 百度小程序

Downloads

5

Readme

微信小程序转换工具

基于已有的原生微信小程序项目,提供零成本平移转换的能力,对小程序间差异进行抹平,提供简单快捷的 API,助力开发者快速互转已有小程序项目

说明

  • 工具会帮你将已有的原生微信小程序转换为目标小程序,目前支持度最好的为百度小程序,其他小程序的能力正在补充中
  • 工具虽然不能完成100%的转换,但可以帮你节省大量的重复开发成本,随着迭代优化,未来转换率会越来越高
  • 目前只支持转百度小程序,后续支持QQ、支付宝、头条等小程序

Quick Start

安装

$ npm i wx2any -g

使用

切换到自己指定的工作目录,执行全局命令wx2any,并指定转换目录路径,和输出目录路径

// 当前只支持百度小程序,其他小程序后续支持
$ wx2any <微信小程序文件夹> <目标小程序文件夹>

注: 路径中请包含'/'作为路径标识

指定目标小程序

使用命令行参数--target,简写-t

# 默认,百度小程序
$ wx2any <微信小程序文件夹> <目标小程序文件夹> --target=bd

# 当前版本暂不支持,qq小程序
$ wx2any <微信小程序文件夹> <目标小程序文件夹> --target=qq

配置

如果你的项目中有专属的自定义函数回调名,接口名,逻辑降级处理等,请在微信项目根目录下放置.joyrc.js文件,并填写如下:

/**
 * @file .joyrc.js
 */
module.exports = {
    // 组件库(u-design);内部项目(internal;外部项目(external)
    project_type: 'external',
    // 微信登录pass的跳转页面函数,推荐默认为bdWxLogin,可配置其他值
    bdWxLogin: 'bdWxLogin',
    // 微信open-type的回调函数,默认推荐为getuserinfo,可配置其他值
    getuserinfo:'getUserInfoHandle'
    // ...其他自定义转换规则
};

注:目前工具只支持识别展示的三项配置,非常希望您把需要新增的自定义配置告诉我们,增加我们的处理能力

联系我们

[email protected]

ChangeLog

V0.0.5 (2020-02-06) 1、JOY(wx2any工具的内部名称,下同) 可视化转换工具 诞生(目前支持Mac操作系统安装)

V0.0.4(2019-01-06) 1、微信网盘小程序 转 QQ小程序 已知问题Fix

V0.0.3(2019-12-25) 1、增加 微信网盘小程序 转 QQ 小程序

V0.0.2(2019-12-18) 1、增加 微信小程序 转 QQ小程序

V0.0.1 (2019-11-11) 1、支持 微信小程序 与 智能小程序 互转

FAQ

Q1:请问有支持Windows系统的可视化转换工具吗? A1:目前开发小哥哥已经在加班加点开发中了,马上会进入测试阶段,预计三月底能够推出Windows版本的呦!

Q2:使用了JOY和百度开发者工具,发现都需要进行一定的二次开发,请问JOY能否支持互转出来就可以直接提审使用呢? A2:由于平台间的差异,并不能100%进行互转,而是针对部分功能进行了降级处理,如果开发者可以接受降级方案就不需要进行二次开发,但为了保证不会由于降级操作而导致阻塞产品流程,还是建议转换后让产品进行全功能体验一下。

Q3:请问带支付功能的系统可以进行迁移吗? A3:目前研发正在支持中,后续就可以进行转换了!

Q4:使用 uni-app 之类的工具开发出来的小程序,JOY支持进行互转吗? A4:JOY互转工具是针对原生开发的小程序进行互转的,不支持转换 uni-app 之类的项目。

吐槽地址

https://support.qq.com/products/123203

License

wx2any is MIT licensed.