- The official template is too old, weex changed a lot.
- The official template only generated native bundleJS, not have html for web.
- You can compile web-side HTML pages directly.
- Introducing postcss-plugin-px2rem and autoprefixer for web, simpler adaptation to web.
- Easy to use vue-router、vuex.
- Support all weex-toolkit(v1.2.8) Commands.
download this repo, and then
npm install
# develop
npm run dev
# build debug bundle to dist folder
npm run build
# build production bundle to dist folder
npm run build prod
If there is an ios project in your platforms folder, when build complated, It will copy bundleJS to /platforms/ios/bundlejs/
.
Package weex-stream module as a vue-plugin, more vue flavor. :)
// GET
this.$http({
url: '/address',
headers: {},
params: {
id: 'test-id'
}
})
// POST
this.$http({
method: 'POST',
url: '/address',
headers: {},
body: {
id: 'test-id'
}
})
If you want to use this vue plugin, config api domain first before develop, in /src/tools/http.js
.
// weex navigator use
navigator.push({
url: getEntryUrl('test'),
animated: 'true'
})