您必须使用 GeoExt3 创建包。对于 Extjs-6 中的打包,请阅读heer http://docs.sencha.com/cmd/6.x/cmd_packages/cmd_packages.html.
如何使用sencha命令打包GeoExt
Install sencha cmd
从这里开始(用
版本 6,目前仅作为预览)。
要生成包,您通常首先创建一个 senchaworkspace
通过发行
sencha -sdk /path/to/ext-n.n.n 生成工作空间 /path/to/workspace
在工作区内部克隆geoext3
存储库到packages
子文件夹:
$ cd /路径/到/工作区/包
$ git 克隆https://github.com/KaiVolland/geoext3.git https://github.com/KaiVolland/geoext3.git GeoExt3
$ cd GeoExt3
然后你就可以发出
$ sencha 包构建
或者,如果您的源代码不在 sencha 工作区中,您可以配置工作区的路径,然后构建:
$ sencha config --propworkspace.config.dir=/path/to/workspace/.sencha/workspace 然后打包构建
将 GeoExt 添加到本地 sencha 存储库
初始化本地“GeoExt Contributors”存储库:
$ sencha package repo init -name "GeoExt Contributors" -email "[电子邮件受保护] /cdn-cgi/l/email-protection"
将包添加到此
$ sencha 包添加 D:/xampp/htdocs/ExtProjects/GeoExt3/build/GeoExt/GeoExt.pkg
将您的应用程序创建为heer http://docs.sencha.com/extjs/6.0/getting_started/getting_started.html.
要在 sencha 应用程序中使用此包,只需将“GeoExt”添加到“requires”数组中
在你的 app.json 中:
/**
* The list of required packages (with optional versions; default is "latest").
*
* For example,
*
* "requires": [
* "charts"
* ]
*/
"requires": [
"GeoExt"
],
最后构建应用程序如下:
$ sencha 应用程序构建