Antmove (Chinese: ants move) quick small program conversion tool

Antmove (Chinese: ants move) quick small program conversion tool

2022-09-05 0 930
Resource Number 38088 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

The AntMove-small program converter recommended in this issue is based on the conversion of Alipay/wechat small programs to multi-terminal small programs, making the cross-platform development of small programs easy.

Antmove (Chinese: ants move) quick small program conversion tool插图

Background

Due to some irremediable differences between platforms, it is not easy to convert a piece of code completely. There is also the problem of different product requirements due to differences in platform functions in developer projects. Antmove therefore supports conditional compilation to help you do secondary development after conversion, conditionally compiling files such as templates, configurations, scripts, and styles.

Quick use

< Template

Use the is-xxx attribute in the template (currently supports is-wx, is-alipay, is-swan, is-tt, is-quick)

< ! -- Source code --> 
< text is-wx>  This is wechat mini program < /text>  // Code that needs to be compiled into the wechat mini program
< text is-alipay>  This is Alipay mini program < /text>  // Code that needs to be compiled into the Alipay applet
< view class="question"  bindtap="toQuestion"> 
   <text class="question-title">What are the reasons for choosing Kindle over paper books? < /text> 
< /view> 

Compiled with wx-alipay type

< ! -- Using Antmove converted Alipay mini program template --> 
< text>  This is Alipay mini program < /text> 
< view class='question'  onTap='antmoveAction' data-antmove-tap='toQuestion'> 
   <text class='question-title'> What are the reasons for choosing Kindle over paper books? < /text> 
< /view> 

< Script

Use an if else conditional statement, such as: Wx. __target__ === ‘alipay’, wx before the comparison operation represents the platform side of the source code (support wx, alipay), The ‘alipay’ after comparison represents the output platform (support ‘alipay’, ‘wx’, ‘tt’, ‘swan ‘, ‘quick’)

// Source code 
let type = null;
if (wx.__target__ === 'alipay') {
    type = 'alipay';  // Code that needs to be compiled into Alipay mini program 
} else {
    type = 'wx';  // Code that needs to be compiled into wechat mini program 
}

Compiled with wx-alipay type

// Using Antmove to convert Alipay mini-program js
let type = null;
type = 'alipay'; 

< Configuration

Use “_< Output platform prefix > Env” as the key (_wxEnv, _alipayEnv, _swanEnv, _quickEnv, _ttEnv)

// Source code 
"_wxEnv":{
  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#0068C4",
    "navigationBarTitleText": "Zhihu wechat mini program ",
    "navigationBarTextStyle": "white",
    "enablePullDownRefresh": true
  }
  },
"_alipayEnv": {
  "window": {
    "navigationBarTitleText": "Zhihu Alipay mini program ",
    "navigationBarTextStyle": "white",
    "enablePullDownRefresh": true
  }
}

Compiled with wx-alipay type

// json
"window": {
  "navigationBarTextStyle": "white",
  "defaultTitle": "Zhihu Alipay mini program ",
  "pullRefresh": true
}

Specific operations

Step 1

First, you need to have a wechat source code that can be compiled across the end, and then use Antmove to compile to other platforms

/**
* Get Alipay mini program code
*/
antmove wx-alipay -i ./ -o .. /minialiapp

Step 2

Use antmove wx to get the wechat code. The purpose of doing so is to maintain a cross-end wechat source code compilation to different platforms

/**
* Get clean wechat code
*/
antmove wx -i ./ -o .. /miniwxapp

Feature

  • Easy to use, one-click conversion
  • Complete with detailed compile-time logging/run-time logging tools
  • The compiled code is readable and can be reprogrammed
  • Secondary compilation support
  • Component conversion support

Installation

VsCode extension installation

Search for Antmove in the vscode extension. Download and install the Antmove vscode conversion plug-in to implement one-click conversion.

We recommend using npm or yarn for development, not only for easy debugging in the development environment, but also for safe packaging and deployment in the production environment to enjoy the benefits of the entire ecosystem and tool chain.

  • Global installation
$ npm install antmove  -g

or

$ yarn global add antmove
  • Local installation
$ npm install antmove --save

or

$ yarn add antmove

If your network environment is not good, cnpm is recommended.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code Antmove (Chinese: ants move) quick small program conversion tool https://ictcoder.com/kyym/antmove-chinese-ants-move-quick-small-program-conversion-tool.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service