1: First to ensure that node.js
the version is greater than 6.0
, or weexpack
will be used to error (partially using the Es6 language, node version is too low support ES6)
All of the following commands are executed by the command line
2: Global Installationweexpack
NPM Install Weexpack-g
3: Build Weex Project
Weexpack Create project Name
Note: The project created by default does not contain iOS and Android engineering templates
4: Go to Project Root install dependency
NPM Install
at this time if you have other Weex items, you can run the normal web, you can copy all the files under the src file to paste the src file in this file, the package will be compiled into the APK
However, first look at the next
android.config.json
or
ios.config.json
specified Weex bundle file
WeexBundle
and change to your starter file
index.js / main.js 之类的
5: Install application template Generation android
or ios
engineeringWeexpack platform add Android//android after execution is completed
platforms
folder under Build
android
File directory Weexpack Platform add iOS//ios after execution is completed
platforms
folder under Build
ios
File directory
6: Pack apkWeexpack Run android-Note:information in ' Android.config.json ' or ' Ios.config.json '- ' AppName: ' generated apk installed app name- ' AppId: ' application_id package name- ' splashtext: ' Open the Welcome page above the display text- ' weexbundle: ' The specified Weex bundle file (in the form of file name and URL) The file name is loaded as a local file, The URL loads the bundle remotely if the bundle is specified locally. We file please put in the SRC directory. Weexpack run iOS//simulator runs Weexpack build Web//Build IPA Package Build package, you will be prompted to enter codesign (certificate)
, Profile (provisioning profiles), AppId, can only be successfully packaged by entering the actual information. The rest, such as appname, and portal Weex bundle files can be edited under the project directory under the Ios.config.json configuration. After the successful completion of the package, you can obtain the IPA file in the/playground/build/ipa_build/directory
Note: The certificate needs to be pre-installed into keychain, right-click in the keychain to obtain the Certificate ID (certificate name), provisioning profile (mobileprovision) need to get UUID, enter the directory You can see the mobileprovision_uuid.sh file, this file can be obtained to uuid*
Mobileprovision_uuid.sh usage is as follows: $./mobileprovision_uuid.sh *mobileprovision
Parameter (*mobileprovision) is the provisioning profile file path
7:HTML5 PackagingWeexpack build Web so you can upload your packaged resources to a CDN server and then go online with your Web project. Weexpack Run web
Weexpack creating projects, packaging Android and iOS