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

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

2022-09-05 0 1,350
Resource Number 38088 Last Updated 2025-02-24
¥ 0HKD 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/antmove-chinese-ants-move-quick-small-program-conversion-tool/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services