1 Feb 2012 2:57 PM #1
Unanswered: How to build ExtJS?
I need to patch a class in ExtJS. How do I re-generate the deployment scripts (ext-all.js, etc.)?
2 Feb 2012 8:38 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
I wouldn't patch the actual library as maintenance wouldn't be the easiest. I would create an override and document it with what it does and what Ext JS version it is for. The reason I say this is say you have a patch for Ext JS 4.0.7 and you upgraded your app to use 4.1.0 b1. Now you have to repatch the library and rebuild but if you had an override that override should still work (depending what it is). Now say you plug 4.1.0 b2 in and the patch you had is actually fixed in b2! Awesome! Now you can evaluate your overrides to see which you can discard, an override is also a means of organizing patches as you can incrementally remove some that aren't relavant anymore.
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
3 Feb 2012 6:09 PM #3
Whereas I appreciate you taking the time to respond, your response presumes to know what I am doing (or that I don't). I am well aware of these issues, and they do not address my question. I am patching 4.0.5 with code from 4.0.7 until such time I am able to upgrade to 4.0.7 (we cannot afford the risk at this point in our cycle, especially knowing that some parts of our system stop working when 4.0.7 is introduced).
I need to know how to rebuild ExtJS scripts. Or, do I have to continue to patch the files manually?
3 Feb 2012 6:39 PM #4
I may have missed your point but...
In my copy of Ext JS 4.0.7 I have a folder call 'build' (I don't know recall if it came with 4.0.7 or from the SDK install). Anyway, in the folder are commands to rebuild the scripts (like ext-all, ext-all-debug, etc.). I also have a 'jsbuilder' folder and behind the scenes the scripts in the build folder execute jsbuilder passing in sdk.jsb3 which is a definition of all the class files to include in the final .js files. The command also support re-generating the CSS from the Sass scripts and re-generating images from the CSS.
This is also the standard way to build custom a .js file for an application so it has just the classes needed to service the application. After the SDK has been installed, a custom jsb3 file is created using the SDK's 'sencha create jsb3' command after which the SDK's 'sencha build' command can be run. Again, behind the scenes, these commands run jsbuilder so this is all main-stream stuff.
I've used all these command and, at least for me, they just work. The hardest part (though not very hard) was getting compass and sass ruby gems installed because it took a while to realize the sass gem needed to be downgraded to 3.1.1 or the css generation fails due to errors.