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

wx-alipay

v0.4.0

Published

微信小程序转化为支付宝小程序

Downloads

5

Readme

wxToAlipay

微信小程序支付宝小程序

命令行打包

npm install wx-alipay -g

wxToalipay --src={{小程序源码目录}} --dest={{支付宝小程序目录,可缺省}}

// 排除部分资源
wxToalipay --src=/weixin/min --filter="!lizard/package/*,!lizard/Gruntfile.js"

// 定制回调, 在框架处理好后,在对每个文件进行处理
wxToalipay --src=/weixin/min --callback="wxToAlipay.js"

wxToAlipay.js定制

module.exports = function (contents, relative) {
  return contents
}

模块化打包

npm install wx-alipay --save
const wxToalipay = require('wx-alipay')

wxToalipay({
  src: '/Users/liaowei/Documents/code/weixin/all',
  // 可缺省
  dest: '/Users/liaowei/Documents/code/weixin/all_alipay',
  // 可缺省,是否开启svg资源转成png图片
  svgToImage: false,
  // 可缺省,数组, 排除资源
  filter: [
    '!lizard/package/**/*',
  ],
  // 可缺省, 可在框架处理好后,在对每个文件进行处理
  callback (contents, relative) {
    return contents
  }
})

filter参数详细说明

注意事项

  1. 微信小程序源码必须能在微信环境运行,转化是基于微信小程序源码
  2. 转化现在只测试了乐车邦微信小程序, 如有bug,请提issue
  3. 部分不能转化的问题,需要源码里面做处理,主要表现在js文件
  4. 打包之前,会对源码进行代码校验,校验通过才能打包
  5. 部分微信小程序特性没法转化, 需自行处理

语法转化规则

  1. js
  2. json
  3. wxml
  4. wxss
  5. wxs
  6. svg

插件

  1. 主要使用bable插件完成Js语法替换,参考babel-types, babel-template, babel-generator, babel-traverse
  2. htmldom完成wxml语法替换
  3. file-system操作文件

乐车邦微信小程序

微信小程序

乐车邦支付宝小程序

正在开发中...