#搭建开发环境: http://weex.apache.org/cn/guide/
- 安装依赖:
npm install -g weex-toolkit
- 初始化:
weex init awesome-project
weex-duyb
weex-duyb
getting start
npm install
file structure
src/*
: all source codeapp.js
: entrance of the Weex pagebuild/*
: some build scriptsdist/*
: where places generated codeassets/*
: some assets for Web previewindex.html
: a page with Web preview and qrcode of Weex js bundleweex.html
: Web render.babelrc
: babel config (preset-2015 by default).eslintrc
: eslint config (standard by default)
npm scripts
# build both two js bundles for Weex and Web
npm run build
# build the two js bundles and watch file changes
npm run dev
# start a Web server at 8080 port
npm run serve
# start weex-devtool for debugging with native
npm run debug
notes
You can config more babel, ESLint and PostCSS plugins in webpack.config.js
.