PDA

View Full Version : app.jsb3 has no dependencies



kbuzyk
12 Oct 2011, 1:42 AM
Hello.

Now I'm working on pretty large ExtJS project. Suggested structure of it:

Project folder (folder) -
- index.html
- ext-4.0.6 (folder)
- resources (folder)
- js (folder) -

- controllers (folder)

- views (folder)

- models (folder)

- stores (folder)

- script.js
script.js is the main application, when this javascript is loaded, all of the proper javascript files will be loaded on demand.
Suggested structure of index.html:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Project Title</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="resources/css/project-ext-theme.css">
<link rel="stylesheet" type="text/css" href="resources/css/project.css">
<script type="text/javascript" src="ext-4.0.6/ext-all-debug.js"></script>
<script type="text/javascript" src="js/controllers/SomeController.js"></script>
<script type="text/javascript" src="js/controllers/OneMoreController.js"></script>
<script type="text/javascript" src="js/stores/SomeStore.js"></script>
<script type="text/javascript" src="js/models/SomeModel.js"></script>
<script type="text/javascript" src="js/models/OneMoreModel.js"></script>
<script type="text/javascript" src="js/views/SomeView.js"></script>
<script type="text/javascript" src="js/script.js"></script>
</head>
<body></body>
</html>

I need to create one single file that contains all the JS classes, so I installed Sencha SDKTools-1.2.3 and tried to build that file.
Here are my steps:
cmd -> go to 'Project folder' directory
type:
sencha create jsb -a index.html -p app.jsb3
Here is my app.jsb3 file:


{
"projectName": "Project Name",
"licenseText": "Copyright(c) 2011 Company Name",
"builds": [
{
"name": "All Classes",
"target": "all-classes.js",
"options": {
"debug": true
},
"files": []
},
{
"name": "Application - Production",
"target": "app-all.js",
"compress": true,
"files": [
{
"path": "",
"name": "all-classes.js"
},
{
"path": "",
"name": "app.js"
}
]
}
],
"resources": []
}

How you can see all the paths are empty, and when I:

3. type:
sencha build -p app.jsb3 -d .

I can see two new files app-all.js and all-classes.js that also are empty.
I'm new with Sencha SDK tool and really need some suggestions or advises that can help me out.
Thanks.

williambeaker
30 Nov 2011, 11:46 AM
I am having this exact same problem, was there a resolution to this found?

Thanks

milestonebass
6 Sep 2012, 11:33 PM
I had the same issue with a 4.1.1 build and solved it by changing the ext import path from:

ext-4.1.1/ext-all.js
to
ext-4.1.1/ext.js (obviously, make sure you've got the script at this path!)

JSB3 builds do not work with the "-all" variants.