WeeX总结

IDE为WebStorm

项目目录如下:

WeeX总结_第1张图片

WeeX编译

1、WeeX编译单个.we文件指令:

例如要将listtest.we文件编译到weex_tmp文件中

weex compile listtest.we weex_tmp

将examples目录下的test.we文件编译到weex_tmp文件中

weex compile examples/test.we weex_tmp

2、WeeX编译多个.we文件指令:

例如将examples文件夹下的所有的.we文件编译到weex_tmp中

weex compile examples/include weex_tmp

$getConfig()详解:

得到的json字符串为:
{
	"bundleUrl": "file://assets/module/instance-api.js",
	"env": {
		"appName": "WXSample",
		"appVersion": "0.5.2.5",
		"deviceHeight": "2560",
		"deviceModel": "SM-G9200",
		"deviceWidth": "1440",
		"logLevel": "log",
		"osVersion": "6.0.1",
		"platform": "android",
		"weexVersion": "0.9.4"
	}
}

你可能感兴趣的:(WeeX总结)