Applets, one of the hottest new species on the Internet. In an era when frames were flying around, Hera came quietly. After more than a month from weWeb, the small program Web development framework introduced last time, we finally launched its full platform version -Hera, its mission is to realize the use of small program to write cross-platform applications, using it can make your small program in addition to running on wechat, can also be packaged into Android, iOS applications. As well as in the way of H5 run in the browser end, to achieve a real sense of a set of code, multi-terminal operation. Greatly increase your development efficiency.
advantages
A set of code runs everywhere
Hera offers powerful cross-platform capabilities: it not only allows developers to smoothly migrate their wechat applets from wechat to Android and iOS apps, but also provides the ability to run on the Web, which is not available in other frameworks such as RN.
The components are rich and easy to use
Its own common components, perfect inheritance of small program built-in components, low learning cost, fully compatible with the development of wechat small program
Fast loading experience is smooth
The Hera framework can also support rapid iteration and update of business. All components and apis are built into the client, and each page contains only core business logic, making the page lighter and capable of dynamic update while loading at high speed.
Introduction is simple and expansibility is high
The client functionality is integrated as an SDK and can be easily integrated in just a few steps. Want to expand features to fit your business? No problem, the convenient API extension mechanism makes your small program unlimited.
Applicable scenario
- If you’re on a tight development budget and want to quickly launch a full platform app,Hera is the place to go
- Native experience, dynamic update capabilities
- Like to try new things, love to study
Sounds good, right? Without further ado, let’s get straight to the dry stuff!
Rapid experience
Erection of scaffolding
To install the Node.js environment on the system, use the following methods to check the version of Node:
node -vCopy the code
If you get a version earlier than V7.6.0 or you can’t find the Node command, download the latest Node.js installation package here.
Tips: If you have network problems while downloading, try switching to a domestic NPM source using the NRM or NPM config command
npm i hera-cli -gCopy the code
Initialize the applets
hera init projNameCopy the code
Go to the new project and make sure there is a config.json file in the root directory:
# Enter the project
cd projName
View the configuration file
cat config.jsonCopy the code
Run on H5 terminal:
hera run webCopy the code
It runs on Android
To run on an Android VIRTUAL machine or real machine, you need to install Android Studio and:
- Android SDK Platform 25
- The Android SDK Build – Tools 25.0.3
If you do not have the above environment, please follow this tutorial to set up the Android development environment
Check whether the device is connected:
adb devicesCopy the code
If you are prompted that adb is not an available command, be sure to add %ANDROID_HOME%\platform-tools and %ANDROID_HOME%\platform-tools to the PATH environment variable
If the device is active, the following information is displayed. If the list is empty or the device is offline, reconnect the Android phone or restart the VM
List of devices attached
0ec123456 deviceCopy the code
Building an application and starting a VM:
hera run androidCopy the code
Note: May download Gradle first running, if you don’t use the proxy server may be down for a long time, if there is a Java. Util. Zip. ZipException error, please delete the user root directory. Gradle directory to retry after the above command or manual install Gradle 3.3
Run on iOS
You first need to have Xcode 8.0 or higher installed on your system. You can download it from the App Store or from the Apple Developer website. This step installs both the Xcode IDE and Xcode’s command-line tools.
Launch Xcode after installation is complete, and in the Xcode | Preferences | check Locations menu is equipped with a version of the Command Line Tools.
Finally, use the following command to install cocoapods
sudo gem install cocoapodsCopy the code
run
hera run iosCopy the code
Note: The above steps only apply to virtual machine environments, if you want to run on a real machine, read: Real Machine Debugging
For more details, please visit Hera’s official website
Also available at github: github.com/weidian-inc… . Welcome to star