In order to reduce file loading, I've compiled my app and I've followed this process:
1) Generate the bootstrap.js by this sencha cmd command:
2) Specify <x-compile> and <-bootstrap> tag like this:
C:\wamp\www\aris\interface\app>sencha compile -classpath=../app meta -alias -out ../build/bootstrap.js and meta -alt -append -out ../build/bootstrap.js and meta -loader -append -out ../build/bootstrap.js
3) Compilation through this command:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="resources/css/grid.css">
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<!-- </x-bootstrap> -->
<!-- </x-compile> -->
I've pasted the all-classes.js and the index.php file from the build folder to the root folder. The problem is when I run the application, thre are many 404 error like this:
InMyAppFolder>sencha compile -classpath=../extjs/src,../app page -in=../index.php -out=../build/index.php
It didn't find another files but I've just took these as example.
- [COLOR=red !important]Uncaught Error: [Ext.Loader] Failed loading 'proxy/ajax.js', please verify that the file exists all-classes.js:10092[/COLOR]
- [COLOR=red !important]Uncaught Error: [Ext.Loader] Failed loading 'AM/model/myFile.js', please verify that the file exists ....[/COLOR]
AM is appName in app.js!Note that I've already specify the appFolder as app and put something like this in the all-classes.js
. I think that it doesn't know how to map AM with app folder. I don't see another issues!Your help is welcome!
Ext.Loader.setPath ('AM', 'app');
Thanks in advance.