0

我有一个 MVC 应用程序要使用

sencha app build production

在此应用程序中,我使用外部类(在我的情况下为 GeoExt.panel.Map),并且 sencha 命令失败,但出现异常

com.sencha.exceptions.ExNotFound: Unknown definition for dependency : GeoExt.panel.Map

有人对如何解决有任何想法吗?


内容添加于 21:17 04.06.2014

请注意,我创建了一个名为 bootstrap.GeoExt.js 的文件,其中包含引用 GeoExt 的所有来源的内容:

Ext.Loader.addClassPathMappings({   
    "GeoExt": "../../../../../GeoExt/geoext2-2.0.1/src/GeoExt"
});

该文件在 index.html 中被引用

<!DOCTYPE HTML>
<html>
<head>    
    <meta charset="UTF-8">
    <title>TestComplete</title>
    <script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script>
    <link rel="stylesheet" href="custom.css">
    <!-- <x-compile> -->
        <!-- <x-bootstrap> -->
            <link rel="stylesheet" href="bootstrap.css">
            <script src="ext/ext-dev.js"></script>
            <script src="bootstrap.GeoExt.js"></script>
            <script src="bootstrap.js"></script>
        <!-- </x-bootstrap> -->
        <script src="app.js"></script>
    <!-- </x-compile> -->
</head>
<body></body>
</html>
4

1 回答 1

0

这就是我在我的 ST 应用程序的包装中包含“额外”文件的方式

一旦我尝试为生产构建我的 ST 应用程序,但我使用的是静态 json 文件(用于原型设计)并且我的主文件夹中有一个数据文件夹,问题是数据文件夹没有包含在包装中,我修复了它最后修改了build.xml(在您的应用程序的主文件夹中),我添加了:

<copy todir="${build.dir}/data/" overwrite="true">
      <fileset dir="${basedir}/data/"> //this is your main app folder 
        <include name="**/*" />
      </fileset>
</copy> 

之后,我的数据文件夹包含在我的生产版本中。

此致。

于 2014-06-04T22:11:25.147 回答