How can I add GeoExt3 to Extjs 6 MVVM architecture?

二次信任 提交于 2019-12-02 02:47:58

You must create a package with GeoExt3. For packaging in Extjs-6 read heer.

How to package GeoExt using sencha command

Install sencha cmd from here (tested with the version 6, only as preview right now).

To generate a package you usually first create a sencha workspace by issuing

sencha -sdk /path/to/ext-n.n.n generate workspace /path/to/workspace

Inside of the workspace clone the geoext3 repository into the packages subfolder:

$ cd /path/to/workspace/packages
$ git clone https://github.com/KaiVolland/geoext3.git GeoExt3
$ cd GeoExt3

Then you can issue

$ sencha package build

Alternatively, if your source isn't living inside of a sencha workspace, you can configure the path to a workspace and then build:

$ sencha config --prop workspace.config.dir=/path/to/workspace/.sencha/workspace then package build

Adding GeoExt to a local sencha repository

Initalize the local "GeoExt Contributors" repository:

$ sencha package repo init -name "GeoExt Contributors" -email "dev@geoext.org"

Add the package to this

$ sencha package add D:/xampp/htdocs/ExtProjects/GeoExt3/build/GeoExt/GeoExt.pkg

create your app as heer.
To use this package in a sencha app just add "GeoExt" to the "requires"-array in your app.json:

/**
 * The list of required packages (with optional versions; default is "latest").
 *
 * For example,
 *
 *      "requires": [
 *          "charts"
 *      ]
 */
"requires": [
    "GeoExt"
],

and at the end build app as follow:

$ sencha app build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!