Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Sencha Cmd with dynamically loaded controllers
    primarykey
    data
    text
    <p>I've created an application using Ext JS 4. <code>controllers</code> property in my <code>app.js</code> contains only the main controller:</p> <pre class="lang-js prettyprint-override"><code>Ext.application({ name: 'MyApp', appFolder: 'app', controllers: [ "main.App" ], loadController: function(controller) { var oController = this.getController(controller); oController.init(this); oController.onLaunch(this); } }); </code></pre> <p><code>MyApp.main.App</code> controller loads additional controllers by name using <a href="http://docs.sencha.com/ext-js/4-1/#!/api/Ext.app.Application-method-getController">getController()</a> approach (see loadController() method). These controllers are loaded dynamically and are not listed in my <code>index.html</code> file.</p> <p>In order to generate production version for deployment to server I am using Sencha Cmd by issuing the following command in my application folder:</p> <pre><code>sencha app build </code></pre> <p>Tool finishes normally and compresses all files into one big all-classes.js. The problem is that my dynamically loaded controllers are not included in that file.</p> <p>Which is the correct way to make dynamically loaded controllers (over 100 in total) to be minified and processed by Sencha Cmd? </p> <p>I know, that I can list them in my <code>app.js</code>, or include in some file using <code>Ext.require</code>, but I am seeking for correct approach for including over than 100 different controllers, views, models and stores automatically in my build. I believe that are other users of Ext JS, which are creating large-scale applications and are building somehow and I'll be grateful for any suggestions or just <code>success stories</code>, which will help me to find the correct way to build.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload