I have a Sencha Architect 2.1 (SA21) project that I am trying to compile with SenchaCmd.
The structure of the project is as following:
Code:
/app
/lib
    /extjs
    /ux
/build
    /index.html
    /myapp-all-debug-w-comments.js
    /myapp-all-debug.js
    /myapp-all.js
/bootstrap.js
/app.js
/app.html
/index.html

Project loads fine with both app.html and index.html.
index.html uses ext-dev.js and has all the necessary directives for compiling (as app.html is reserved by SA21). See below for index.html


The problem is 2 fold.


Problem #1
---------------------------
1) When I generate bootrstrap.js and use it in index.html I get bunch of loading errors. If I comment out bootstrap.js, everything works ok. Here is the command I use to generate bootrstap.js
Code:
sencha compile -classpath=lib/extjs/src,lib/ux,app,app.js ^
    meta -loader-paths -base-path . -out bootstrap.js and ^
    meta -alternates -append -out bootstrap.js and ^
    meta -alias -append -out bootstrap.js and ^
    meta -manifest -out manifest.json and ^
    meta -filenames -json -out filenames.json
Th errors I get are a bunch of Ext.Loader issues with following format:
Code:
Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MyAppControllerOne.js/model/account/Index.js', please verify that the file exists 
Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MyAppControllerOne.js/view/account/Index.js', please verify that the file exists
Notice the path!? It does not make sense and I am not sure where it is getting this path.
The bootstrap.js file that is generated has correct paths (among many) for all files reported in the error console.
It looks proper to me:
Code:
Ext.Loader.addClassPathMappings({
...
"MyApp.controller.MyAppControllerOne": "app/controller/MyAppControllerOne.js",
...
"MyApp.model.account.Index": "app/model/account/Index.js",
...
"MyApp.view.account.Index": "app/view/account/Index.js",
Any idea what I am doing wrong here?


Problem #2
---------------------------
2) After compiling the app and using "all-in-one" generated JS file, I am still getting loader errors. I use following command to generate build files
Code:
sencha compile -classpath=lib/extjs/src,lib/ux,app,app.js -ignore=./bootstrap.js ^
    concat build/myapp-all-debug-w-comments.js and ^
    -options debug:true concat -strip-comments build/myap-all-debug.js and ^
    -options debug:false concat -yui build/myap-all.js

The problem is again related to loader. The fact is, loader is supposed to be disabled here (documentation specifies that Ext.Loader is disabled by default)! But according to messages, it is not.
I breifly modified -debug file and added
Code:
Ext.Loader.setConfig({
    enabled: false
});
but some files still fail to load.
What I don't understand is why these files are being even looked by by loader when all classes and now in single file.I included "production" index.html that I used












/index.html
Code:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>MyApp</title>    
        <link rel="stylesheet" type="text/css" href="lib/extjs/resources/css/ext-all.css" />
        <link rel="stylesheet" type="text/css" href="resources/css/app.css" />        
        <!-- <x-compile> -->
            <!-- <x-bootstrap> -->
            <script type="text/javascript" src="lib/extjs/ext-dev.js"></script>
            <script type="text/javascript" src="bootstrap.js"></script>
            <!-- </x-bootstrap> -->
            <script type="text/javascript" src="app.js"></script>
        <!-- </x-compile> -->                 
    </head>
    <body>
        <div id="loading-mask"></div>
        <div id="loading">
            <div class="loading-indicator">
                Loading...
            </div>
        </div>
    </body>
</html>



/build/index.html
Code:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>MyApp</title>    
        <link rel="stylesheet" type="text/css" href="../lib/extjs/resources/css/ext-all.css" />
        <link rel="stylesheet" type="text/css" href="../resources/css/app.css" />        
<script type="text/javascript" src="myapp-all-debug.js"></script>
    </head>
    <body>
        <div id="loading-mask"></div>
        <div id="loading">
            <div class="loading-indicator">
                Loading...
            </div>
        </div>
    </body>
</html>