After much tiral and error, I've found this command seems to do mostly what I want. The output is a new HTML file which references a script called 'all-classes.js' which contains all my JS code in one file.
However, when I load the new build.html, I get a error in the JS console.
sencha compile -classpath=app.js,app,sdk/src page -in=src.html -out=build.html
I've looked through the all-classes file and the Ext.form.Panel is definitely present in the file (with the alias 'widget.form') so I'm now lost. What can I do next? Any help resolving this is appreciated.
Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.form
My thought is that perhaps we need to have the microloader intact in your src.html file.
Then try rebuilding it with compile
<!-- The line below must be kept intact for Sencha Command to build your application -->
This is an ExtJS 4.1 project, not a touch project. Is there an equivalent 'microloader' for ExtJS?
So ExtJS index file does have some special stuff
<link rel="stylesheet" href=".res/default/app.css">
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<!-- </x-bootstrap> -->
<!-- </x-compile> -->
My bootstrap.js files only contains license information, no code, so I cannot see how this helps. The initial project created by Architect does not have the bootstrap.js file either.
Has anyone successfully used Sencha Cmd to deploy and run an Architect project?
After investigating the all-classes.js file, it seems that some classes are being defined before their dependencies.
which uses a form panel (widget.form) in it's config data, is above the line:
Any idea why this is happening?
I've been able to work around this using the requires list inside Architect. I didn't think this was supposed to be necessary?
However, I'm now getting a "Uncaught TypeError: Cannot call method 'on' of undefined" which I've tracked down to a store not being registered in the Ext.data.StoreManager.
I'm getting the impression that the sencha build tools are a bit immature when it comes to coping with larger projects, unless I'm doing something fundamentally wrong with my project.
It seems much of my problems are caused by checking the 'singleton' box for some of my views.
I uncheck this, and these errors go away. I'll need to rewrite some of my functions to work with this configuration, but at least I'm making progress here...
Woohoo I solved all the dependency issues, pages and stores are now loading.
However the built project only comes up with a blank screen. No errors or messages. Just blank. Of course, the source project does not do this.
I'd be super happy if someone could get me past this to a working build!
Have you tried the built project in Chrome/Safari/FF?
Is it white screen on device or browser?
Any errors in Chrome?