A demo for using own defined extensions for weex-html5.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
demo use weex-hello Aug 22, 2016
src update Aug 22, 2016
.babelrc init Aug 16, 2016
.eslintrc init Aug 16, 2016
.gitignore init Aug 16, 2016
LICENSE init Aug 16, 2016
README.md update Aug 24, 2016
index.html init Aug 16, 2016
package.json update weex-html5 version Oct 19, 2016
webpack.config.js init Aug 16, 2016
webpack.transform.config.js init Aug 16, 2016



This is a simple demo for weex to extend a self-defined component on web platform using weex-html5. In this demo we use the created component named 'mine' and installed it to run.

The other repo weex-hello contains the code of component's defining and specifying its attribute, style and events. You can set up your attribute setters, style setters and event configuration in your component's implementation, and also override the methods like 'create' of the base class 'Component'.


STEPS to demonstrate

  1. npm install
  2. npm run transform
  3. npm run build
  4. npm run serve
  5. visit http://localhost:12580/index.html, then you'll see the demo page.

STEPS for extending

  1. require the weex-html5 to do all the rendering work.
  2. you can publish your self-defined component in npm. In this demo, we use the already published component weex-hello in our project. You can go to the repo of weex-hello-web to see the component's defining code.
  3. in your bootstrap file, import the component and install it.
  4. do the initializing work for rendering .we page. It's all in the src/main.js file.
  5. visit the page.