Hybrid View
-
30 Oct 2012 10:16 PM #1
Packaging an Architect project
Packaging an Architect project
I'm attempting to package my Architect ExtJS 4.1 project for a web deployment, in order to reduce the number of HTTP downloads and script size.
I'm using SDK Tool beta 3.
First I run this command in my project folder.
sencha create jsb -a app.html -p app.jsb3
I then run:
sencha build -p app.jsb3 -d .
After that I create an index.html file and change the script locations for the new files.
After they I load the index.html in chrome, and the project doesn't work. The console shows me that for some reason my class files are still trying to be loaded from a folder that doesn't exist (seems related to the namespace of my application).
Is this known to be broken or am I missing something?
-
6 Nov 2012 3:36 PM #2
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
-
6 Nov 2012 6:56 PM #3
Ah I see I was using the wrong tool.
The package command seems to be aimed at Touch projects, I'm trying to minimise a build for the web (ExtJS).
Do these same commands work with ExtJS? After following the steps, I don't see any .json files generated which I can use with the sencha package command. The sencha compile concatenate commands seems to be what I need to use, however the generated file doesn't appear to work when I use it in my app.html file.
-
7 Nov 2012 9:11 AM #4
More documentation and some examples would help us all.
Here is what I have figured out over the last two days.
From the ExtJS SDK directory generate an application directory with
sencha generate app MyApp ~/Sencha/projects/MyApp
Use your own path to the "MyApp" directory.
Then save the Architect project to that directory.
Actually I think that I opened my Architect project first and then deleted the directory where the architect project was and recreated it with the "sencha generate app" command. And then resaved the project into that directory.
Then I ran
sencha app build
to get the built application which will be in the "build" directory.
This assumes that you have all the parts installed correctly.
Sorry if this seems sketchy but I wrote it quickly as I'm still trying to figure out the complete picture.
If this is the wrong information, I hope the Sencha devs will pipe in and correct me.
Worth
-
7 Nov 2012 6:32 PM #5
Hmm sadly this doesn't work for me.
When I follow your method exactly, Architect complains about not being able to save some files.
When I copy the architect project over a generated project manually, I get further, however the built project complains with some javascript errors. The generated index.html is a little different to the architect app.html...
However when I copy app.html over index.html and do a rebuild, I get a 0 byte all-classes.js.
Not sure what to try next...
-
8 Nov 2012 7:26 AM #6
You'll need to simply add the includes from the app.html to index.html as sencha build needs the microloader (afaik)
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team


Reply With Quote