PDA

View Full Version : output difference based on ext library used



edlftt
7 Jun 2011, 9:18 AM
I might have missed some documentation somewhere but I was wondering why the output of sencha build is different if one includes ext-core vs. ext-all.

I have used the following:
sencha create jsb -a simple.html -p app.jsb3
sencha build -p app.jsb3 -d .

An all-classes.js gets built with ext-all and classes.js with just ext-core. The reason I am asking this is because the simple example project that comes with extjs 4 does not render anything if i use ext-core.js but it works if i change it to ext-all and instead include all-classes.js.

Any thoughts are appreciated. I am still trying to get my mind wrapped around all the changes in ExtJS 4.

Thank you!

Jacky Nguyen
8 Jun 2011, 5:27 PM
The internal tools we used to build the examples shipped inside the SDK is not fully in sync yet with the latest SDK Tools. To build those examples, follow the steps below. I'll take the Nested Loading MVC one as an example:

1. Open /path/to/sdk/examples/app/nested-loading
2. Create a new file called dev.html with the following content:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Loading Nested Data Example</title>
<link rel="stylesheet" type="text/css" href="../../shared/example.css"/>
<link rel="stylesheet" type="text/css" href="resources/css/nested-loading.css"/>

<script type="text/javascript" src="../../../ext-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>

<body></body>
</html>

3. Create a new file called production.html with the following content:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Loading Nested Data Example</title>
<link rel="stylesheet" type="text/css" href="../../shared/example.css"/>
<link rel="stylesheet" type="text/css" href="resources/css/nested-loading.css"/>

<script type="text/javascript" src="../../../ext.js"></script>
<script type="text/javascript" src="app-all.js"></script>
</head>

<body></body>
</html>

4. Open dev.html on the browser, it's the development version with dynamic loading
5. To build, run the following commands:

cd /path/to/sdk/examples/app/nested-loading
sencha create jsb -a dev.html -p nested-loading.jsb3
sencha build -p nested-loading.jsb3 -d .

6. Open production.html on the browser, it's the production version with all classes bundled into app-all.js