PDA

View Full Version : Build output files empty



gugulethun
6 Dec 2011, 3:09 AM
I'm deploying my first Ext Js application. I downloaded the latest Windows SDK Tools. I run the 2 commands below.


sencha create jsb -a http://localhost:12605/ -p app.jsb3


sencha build -p app.jsb3 -d . -v

The two output files (app-all.js & all-classes.js) generated are both 1KB in size.

What am I doing wrong?

mitchellsimoens
6 Dec 2011, 7:34 AM
Is the app.jsb3 file pretty empty?

This would tell me that you don't have the requires/uses or Ext.require setup properly throughout your app. You have to set these to tell the SDK Tools to include those classes into the build.

mitchellsimoens
6 Dec 2011, 7:34 AM
Is the app.jsb3 file pretty empty?

This would tell me that you don't have the requires/uses or Ext.require setup properly throughout your app. You have to set these to tell the SDK Tools to include those classes into the build.

jeromer
7 Dec 2011, 4:31 PM
can you be more specific? This may be part of my problem. I cannot understand why after following the build tool instructions the app does not run. How do you know what to require if your app runs in its non-build form. I don't even see any suggestions on the console about using require when I run my app. So how do I know what to require?

keithrust
12 Dec 2011, 4:33 PM
I have the exact same issue. The documentations/examples on how to use the SDK Tools seems to be severely lacking, or I just don't know where to find the right information. Other than the basic commands to generate the jsb3 file and build the package I haven't seen anything that helps in identifying how to set this up and use the tool. Help!!

keithrust
12 Dec 2011, 4:36 PM
I should add that when I run "sencha build -p app.jsb3 -d ." I get an error saying app.js doesn't exist, which is true. My output came from Designer and there is no app.js file.

keithrust
12 Dec 2011, 5:54 PM
So, here's what I had to do to get this thing to work. The app.jsb3 file is created, but only the shell. For some reason the file doesn't get created properly as I would expect, perhaps because I'm using Designer?? Anyhoo, when I manually configure the file to include the paths and file names to be included in all-classes.js I'm able to get the thing to run.

So:

1. Run sencha create jsb -a <path or URL> -p app.jsb3
2. Modify app.jsb3 to include the files I need
3. Run sencha build -p app.jsb3 -d .

I also found out that having spaces in the directory paths (I'm on a Mac) is a no-no, so I had to copy my project to another directory before this would run.

jeromer
13 Dec 2011, 10:10 AM
Your #2 step I'm sure is the key. When you say modify the jsb3 file to include the files you needed, how did you resolve what they were. Is it just every path to .js files in your app. Is the true for the MVC structured app? I have an app structured like this; 29976

keithrust
13 Dec 2011, 10:18 AM
Exactly. I just found all of the js files, included the paths and file names, then when building it used these paths and crunched the output.

I do have to add that even though my build was successful I'm still having issues using app-all.js in my project. For some reason a call is being made to a directory that doesn't exist, but when using the Designer generated js files it works just fine. <sigh>

Come on Designer 2.0!

jeromer
13 Dec 2011, 10:24 AM
I'm sorry. I actually did include all the files and got nothing. No errors, no app display but a lot of warnings. Here are the first few 29977

keithrust
13 Dec 2011, 10:27 AM
So first check to see if the app-all.js file actually has content, or rather all of the content that it should have based on the included files. It could be that the build worked, but the execution of the build doesn't work, which is my current issue as well.

jeromer
13 Dec 2011, 11:01 AM
I checked the app-all.js file. There is a lot of code in it, but I can't find any of my code in there. I guess it is because of the minification. I'm just trying to make this statement come true,
"Our new SDK Tools have the power to automatically create an optimized build of your app, removing any unused classes and providing you the best loading experience possible. Along with other Optimize your Ext JS projects with our command line interface that works on any platform: Windows, Mac and Linux. Find out more about JSBuilder (http://www.sencha.com/products/jsbuilder)."

I would really like this to work and I don't really want my code exposed and a long load time when I release the project. So help from anywhere is greatly appreciated.

korax
15 Dec 2011, 10:42 AM
I hope this helps some people: how to use the SDK (http://www.sencha.com/forum/showthread.php?142768-Using-the-SDK-tools).