Twitter bootstrap 从extjs应用程序文件夹外部使用bootstrap.js加载extjs

Twitter bootstrap 从extjs应用程序文件夹外部使用bootstrap.js加载extjs,twitter-bootstrap,extjs,load,customization,extjs5,Twitter Bootstrap,Extjs,Load,Customization,Extjs5,我已经使用sencha cmd构建了extjs 5应用程序,我想在我的自定义hmtl页面中使用它。 我的结构如下: extjsapp .sencha app build ext packages ...... bootstrap.js bootstrap.json app.js ....... customapp index.html script.js 我想做的是在我的customapp/inde

我已经使用sencha cmd构建了extjs 5应用程序,我想在我的自定义hmtl页面中使用它。 我的结构如下:

extjsapp
    .sencha
    app
    build
    ext
    packages
    ......
    bootstrap.js
    bootstrap.json
    app.js
    .......
customapp
    index.html
    script.js
我想做的是在我的customapp/index.html中请求bootstrap.js,它应该从extjsapp文件夹加载所有包和ext。默认情况下,它会尝试从customapp/ext加载它们,而customapp/ext与boostrap.js的使用位置相关。我如何制作/构建它,以便它从extjsapp/ext而不是customapp/ext加载ext


应该可以从任何位置使用bootstrap.js来加载extjs框架和在extjs文件夹中构建的所有必需包。

app.json
文件中,您将看到一个关于类路径的条目。这用于告诉Sencha Cmd源文件的位置

在该文件中,您还将看到一个关于indexHtmlPath的条目。这表示index.html文件的位置

/**
 * Comma-separated string with the paths of directories or files to search. Any classes
 * declared in these locations will be available in your class "requires" or in calls
 * to "Ext.require". The "app.dir" variable below is expanded to the path where the
 * application resides (the same folder in which this file is located).
 */
"classpath": "${app.dir}/app",
...
/**
 * The file path to this application's front HTML document. This is relative
 * to this app.json file.
 */
"indexHtmlPath": "index.html",

更改ExtJS库的位置涉及编辑隐藏文件-
.sencha/app/sencha.cfg
。其中有一个属性-
ext.dir
,您需要更改。

我在.sencha/workspace/sencha.cfg中找到了该属性,而不是在.sencha/app/sencha.cfg中。改变是可行的,但它需要相对的路径。你自己试试吧。如果我将其更改为/extjsapp/ext,它在bootstrap.jsonies中仍然是ext;如果您有一个应用程序项目,它位于
.sencha/app
中;如果您使用工作区,它位于
.sencha/workspace
中。