Created
August 31, 2012 11:19
-
-
Save johnyanarella/3551608 to your computer and use it in GitHub Desktop.
Configuring Ext JS's Loader to load individual Deft JS files during development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Example Application</title> | |
<link rel="stylesheet" type="text/css" href="lib/extjs-4.1.0/resources/css/ext-all.css"/> | |
<script type="text/javascript" src="lib/extjs-4.1.1/ext-dev.js"></script> | |
<script type="text/javascript"> | |
Ext.Loader.setConfig({ | |
enabled: true, | |
paths: { | |
'Ext': 'lib/extjs-4.1.1/src', | |
'Deft': 'lib/deftjs-0.8.0pre/src/js/Deft' | |
} | |
}); | |
// TODO: Your application's startup logic. | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Correction: .JSB3
rather than .JS3B
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will configure Ext JS's Loader to load the individual Deft JS class files.
Then, when you create your deployment build via the Sencha SDK Tools (http://www.sencha.com/products/sdk-tools), only the Deft classes you actually use will be pulled into the .JS3B and final minified build.
NOTE: This only works for Deft JS v0.8.0preview and above (currently in the 'master' branch of the Deft JS GitHub repository), as prior versions were missing some necessary
require
statements.