In view of the QQ small program is about to be publicly available, recently began to invest in the development of small programs, made a small program to see comics. After the development of QQ small program, the boss said that the small program will be released to the micro channel small program platform! As a programmer, I can say no! Then start to understand the API documents of micro channel applets, found that the original micro channel applets and QQ applets are basically the same SET of API, in addition to QQ and WX logo difference, then use tools to convert it, so as not to rewrite the code! As a small program rookie, can only be based on the ideas of the big guy, optimize a set of conversion tools, a key conversion success, share with you.

The installation

npm i mini2mini -g
Copy the code

Method of use

mini2mini wx <path/to/wxapp> qq <path/to/qqapp> [--watch] [--minify] [--minify-css] [--minify-js] [--minify-xml]
Copy the code

Parameters that

  • Path /to/wxapp indicates the wechat applets directory
  • Path /to/ qqApp indicates the QQ applet directory
  • — Watch: running in listening mode
  • — Minify compresses all files that can be compressed
  • — Minify-xss compresses only WXSS files
  • Minify-js compresses only JS files
  • — Minify-xml compresses only WXML files

instructions

The function of mini2mini is very simple. It converts wechat applets into QQ applets. It mainly does the following things:

  • Converting XML suffixes
  • Converting CSS suffixes
  • Replace wx: in XML with QQ:
  • Replace js wx. With QQ.
  • Github address: mini2mini