View Full Version : How to add in non-Sencha library and deploy it
8 Feb 2012, 7:00 PM
I was able to (in ST1.1) add in a library in the index.html with a line such as:
and then call the code (in this case an MD5 hash routine) with:
In Designer, how do I do this now? And will the md5-min.js file deploy somehow too?
9 Feb 2012, 12:25 AM
You could add it after deploying the project...
9 Feb 2012, 12:43 AM
THis is an excellent question and a common thing that people will run into. Designer 2.x has the concept of a "working directory" meaning that your project directory should always be capable of running. It's all of the stuff that generates the working application.
You can create a lib directory in your project folder and put md5-min.js in that directory.
Anytime you package the application for deployment and/or archive the project to send to someone else, this directory and files will be included.
Now the tough part currently is linking in the project. We have a resource manager in the works which will be coming soon. But for now you will have to include this script tag manually. What I would recommend while the resource manager is not in the product is the following:
duplicate designer.html to index.html
Add the additional script tag in the proper place in the index.html
Your index.html will not be overwritten and no new changes that you make will affect it.
It however will be included when you deploy and/or archive the project.
You can of course use the hex_md5 method in any of your view implementation methods and/or controllers because the library will be included. Please let us know how far you get with this and if you hit any stumbling blocks on the way.
9 Feb 2012, 8:50 AM
@aconran Thank you so much - that seems to work great!
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.